mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 14:17:22 +01:00
new client various fixes: flagging; non-Public Challenges can have 0 gem prize; etc (#9072)
* allow a user (admin or non-admin) to flag their own message Initially implemented in https://github.com/HabitRPG/habitica/issues/8005 Use case for a non-admin needing to flag their own message: - a new user posts a question - a socialite answers - the user posts again and reveals that they're under 13 - the socialite flags all of the user's messages and all replies to the user including the socialite's own reply (it's a requirement that all messages to and from under-aged users be hidden and some socialites know this) * change NPC message for Tavern: "Rest in the Inn" > "Pause Damage" * prevent a chat message being hidden until it's been flagged more than once * allow non-Tavern (non-"Public") challenges to have zero gem prize Also changes message about gem prize to say "Public Challenges" instead of "Tavern Challenges" * finish committing merge conflict
This commit is contained in:
@@ -20,7 +20,8 @@
|
||||
)
|
||||
.card(:class='inbox ? "col-8" : "col-10"')
|
||||
.mentioned-icon(v-if='isUserMentioned(msg)')
|
||||
.message-hidden(v-if='msg.flagCount > 0 && user.contributor.admin') Message Hidden - {{ msg.flagCount }} Flags
|
||||
.message-hidden(v-if='msg.flagCount === 1 && user.contributor.admin') Message flagged once, not hidden
|
||||
.message-hidden(v-if='msg.flagCount > 1 && user.contributor.admin') Message hidden
|
||||
.card-block
|
||||
h3.leader(
|
||||
:class='userLevelStyle(cachedProfileData[msg.uuid])'
|
||||
@@ -53,7 +54,8 @@
|
||||
.row(v-if='user._id === msg.uuid')
|
||||
.card(:class='inbox ? "col-8" : "col-10"')
|
||||
.mentioned-icon(v-if='isUserMentioned(msg)')
|
||||
.message-hidden(v-if='msg.flagCount > 0 && user.contributor.admin') Message Hidden - {{ msg.flagCount }} Flags
|
||||
.message-hidden(v-if='msg.flagCount === 1 && user.contributor.admin') Message flagged once, not hidden
|
||||
.message-hidden(v-if='msg.flagCount > 1 && user.contributor.admin') Message hidden
|
||||
.card-block
|
||||
h3.leader(
|
||||
:class='userLevelStyle(cachedProfileData[msg.uuid])',
|
||||
@@ -71,7 +73,7 @@
|
||||
span.action( @click='copyAsTodo(msg)')
|
||||
.svg-icon(v-html="icons.copy")
|
||||
| {{$t('copyAsTodo')}}
|
||||
span.action(v-if='user.contributor.admin || (msg.uuid !== user._id && user.flags.communityGuidelinesAccepted)', @click='report(msg)')
|
||||
span.action(v-if='user.flags.communityGuidelinesAccepted', @click='report(msg)')
|
||||
.svg-icon(v-html="icons.report")
|
||||
| {{$t('report')}}
|
||||
span.action(v-if='msg.uuid === user._id', @click='remove(msg, index)')
|
||||
@@ -353,7 +355,7 @@ export default {
|
||||
},
|
||||
canViewFlag (message) {
|
||||
if (message.uuid === this.user._id) return true;
|
||||
if (!message.flagCount || message.flagCount === 0) return true;
|
||||
if (!message.flagCount || message.flagCount < 2) return true;
|
||||
return this.user.contributor.admin;
|
||||
},
|
||||
async loadProfileCache (screenPosition) {
|
||||
|
||||
Reference in New Issue
Block a user