Fixes sept 1 (#9016)

* Added avatars to inbox

* Added ordering of inbox messages

* Fixed blurb not converting to string

* Added message to member modal

* Added quest invites

* Moved filters to server
This commit is contained in:
Keith Holliday
2017-09-01 15:26:10 -06:00
committed by GitHub
parent e450e52836
commit c2aaa9b592
11 changed files with 180 additions and 40 deletions

View File

@@ -4,15 +4,13 @@
.col-12
copy-as-todo-modal(:copying-message='copyingMessage', :group-name='groupName', :group-id='groupId')
report-flag-modal
.row
.hr.col-12
div(v-for="(msg, index) in chat", v-if='chat && (inbox || Object.keys(cachedProfileData).length > 0)')
// @TODO: is there a different way to do these conditionals? This creates an infinite loop
//.hr(v-if='displayDivider(msg)')
.hr-middle(v-once) {{ msg.timestamp }}
.row(v-if='user._id !== msg.uuid')
.col-2
.col-4
avatar(v-if='cachedProfileData[msg.uuid]',
:member="cachedProfileData[msg.uuid]", :avatarOnly="true",
:hideClassBadge='true')
@@ -41,7 +39,7 @@
.svg-icon(v-html="icons.liked")
| + {{ likeCount(msg) }}
.row(v-if='user._id === msg.uuid')
.card.col-8.offset-2
.card.col-8
.card-block
h3.leader(:class='userLevelStyle(cachedProfileData[msg.uuid])')
| {{msg.user}}
@@ -65,7 +63,7 @@
span.action.float-right(v-if='likeCount(msg) > 0')
.svg-icon(v-html="icons.liked")
| + {{ likeCount(msg) }}
.col-2
.col-4
avatar(v-if='cachedProfileData[msg.uuid]',
:member="cachedProfileData[msg.uuid]", :avatarOnly="true",
:hideClassBadge='true')
@@ -288,10 +286,13 @@ export default {
return;
}
// @TODO: Not sure we need this hash
let aboutToCache = {};
this.messages.forEach(message => {
let uuid = message.uuid;
if (uuid && !this.cachedProfileData[uuid]) {
if (uuid && !this.cachedProfileData[uuid] && !aboutToCache[uuid]) {
if (uuid === 'system' || this.currentProfileLoadedCount === this.currentProfileLoadedEnd) return;
aboutToCache[uuid] = {};
promises.push(axios.get(`/api/v3/members/${uuid}`));
this.currentProfileLoadedCount += 1;
}