message clumping!!!!!!!
This commit is contained in:
parent
6a4112a13e
commit
4dd9540430
3 changed files with 16 additions and 4 deletions
|
@ -155,7 +155,7 @@
|
||||||
<span>by <a class="md-dense cursor" v-on:click="viewProfile(post.creator._id)" v-bind:style="{ 'color': post.creator.color}">{{ post.creator.username }}</a></span>
|
<span>by <a class="md-dense cursor" v-on:click="viewProfile(post.creator._id)" v-bind:style="{ 'color': post.creator.color}">{{ post.creator.username }}</a></span>
|
||||||
</md-card-header>
|
</md-card-header>
|
||||||
|
|
||||||
<md-card-content v-html="post.body"></md-card-content>
|
<md-card-content style="white-space: break-spaces !important;" v-html="post.body"></md-card-content>
|
||||||
|
|
||||||
<md-card-actions>
|
<md-card-actions>
|
||||||
<md-button v-for="button in cardButtons" v-bind:key="button.text" @click="button.click(post)"><md-icon>{{ button.text }}</md-icon></md-button>
|
<md-button v-for="button in cardButtons" v-bind:key="button.text" @click="button.click(post)"><md-icon>{{ button.text }}</md-icon></md-button>
|
||||||
|
@ -167,7 +167,7 @@
|
||||||
<a class="md-dense cursor md-title" v-on:click="viewProfile(post.author._id)" v-bind:style="{ 'color': post.author.color}"><span>{{ post.author.username }}</span></a>
|
<a class="md-dense cursor md-title" v-on:click="viewProfile(post.author._id)" v-bind:style="{ 'color': post.author.color}"><span>{{ post.author.username }}</span></a>
|
||||||
</md-card-header>
|
</md-card-header>
|
||||||
|
|
||||||
<md-card-content>{{ post.content }}</md-card-content>
|
<md-card-content style="white-space: break-spaces !important;">{{ post.content }}</md-card-content>
|
||||||
</md-card>
|
</md-card>
|
||||||
<br>
|
<br>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -261,7 +261,16 @@ const app = new Vue({
|
||||||
},
|
},
|
||||||
processMessage: async function(messageObject) {
|
processMessage: async function(messageObject) {
|
||||||
if (!this.messages[messageObject.category._id]) this.$set(this.messages, messageObject.category._id, []);
|
if (!this.messages[messageObject.category._id]) this.$set(this.messages, messageObject.category._id, []);
|
||||||
|
const categoryMessageList = this.messages[messageObject.category._id];
|
||||||
|
|
||||||
|
const lastMessageIndex = categoryMessageList.length-1;
|
||||||
|
const lastMessage = categoryMessageList[lastMessageIndex];
|
||||||
|
if (lastMessage && lastMessage.author._id === messageObject.author._id) {
|
||||||
|
categoryMessageList[lastMessageIndex].content += `\n${messageObject.content}`
|
||||||
|
} else {
|
||||||
this.messages[messageObject.category._id].push(messageObject);
|
this.messages[messageObject.category._id].push(messageObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (messageObject.category._id === this.selection.category._id) {
|
if (messageObject.category._id === this.selection.category._id) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
vulns:
|
vulns:
|
||||||
- you can send a malformed request and express will send the full error
|
- you can send a malformed request and express will send the full error
|
||||||
- 2 users can have the same name if one of the letters is uppercase
|
- 2 users can have the same name if one of the letters is uppercase
|
||||||
|
|
||||||
|
notes:
|
||||||
|
- please remove excessive whitespace please
|
Reference in a new issue