mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-04 04:59:40 +00:00
Fix bug in NPC style display
This commit is contained in:
parent
4da1ed92bd
commit
2427743d0f
5 changed files with 15 additions and 7 deletions
|
|
@ -71,8 +71,8 @@
|
|||
}
|
||||
|
||||
.tierNPC, .npc {
|
||||
color: #77f4c7;
|
||||
fill: #77f4c7;
|
||||
color: #4E4A57;
|
||||
fill: #4E4A57;
|
||||
stroke: #005737;
|
||||
|
||||
&:hover, &:active, &:focus {
|
||||
|
|
|
|||
|
|
@ -3,15 +3,19 @@
|
|||
<div class="banner-g1g1 mx-n3 d-flex justify-content-center">
|
||||
<div
|
||||
class="svg-icon svg-gifts my-auto mr-5 ml-auto"
|
||||
v-html="icons.giftsVertical">
|
||||
v-html="icons.giftsVertical"
|
||||
>
|
||||
</div>
|
||||
<div class="my-auto text-center">
|
||||
<strong> {{ $t('g1g1Announcement') }} </strong>
|
||||
<div class="mt-1"> {{ $t('g1g1Details') }} </div>
|
||||
<div class="mt-1">
|
||||
{{ $t('g1g1Details') }}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="svg-icon svg-gifts gifts-right my-auto ml-5 mr-auto"
|
||||
v-html="icons.giftsVertical">
|
||||
v-html="icons.giftsVertical"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<h1>{{ $t('subscription') }}</h1>
|
||||
|
|
|
|||
|
|
@ -92,9 +92,9 @@ export default {
|
|||
},
|
||||
isNPC () {
|
||||
if (this.backer) {
|
||||
return this.backer.level;
|
||||
return this.backer.tier;
|
||||
} if (this.user && this.user.backer) {
|
||||
return this.user.backer.level;
|
||||
return this.user.backer.tier;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -418,6 +418,7 @@ export default {
|
|||
id: '',
|
||||
text: '',
|
||||
timestamp: new Date(),
|
||||
backer: this.initiatedConversation.backer,
|
||||
}];
|
||||
}
|
||||
// Create conversation objects
|
||||
|
|
@ -435,6 +436,7 @@ export default {
|
|||
lastMessageText: recentMessage.text,
|
||||
canLoadMore: true,
|
||||
page: 0,
|
||||
backer: recentMessage.backer,
|
||||
};
|
||||
|
||||
convos.push(convoModel);
|
||||
|
|
|
|||
|
|
@ -125,6 +125,7 @@ export async function listConversations (owner) {
|
|||
username: { $last: '$username' },
|
||||
timestamp: { $last: '$timestamp' },
|
||||
text: { $last: '$text' },
|
||||
npc: { $addToSet: '$backer.npc' },
|
||||
count: { $sum: 1 },
|
||||
},
|
||||
},
|
||||
|
|
@ -141,6 +142,7 @@ export async function listConversations (owner) {
|
|||
const conversations = conversationsList.map(res => ({
|
||||
uuid: res._id,
|
||||
...res,
|
||||
backer: Array.isArray(res.npc) && res.npc.length > 0 ? { npc: res.npc[0] } : { npc: null },
|
||||
userStyles: usersMap[res._id].userStyles,
|
||||
contributor: usersMap[res._id].contributor,
|
||||
}));
|
||||
|
|
|
|||
Loading…
Reference in a new issue