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