mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user