mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +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:
@@ -300,16 +300,8 @@ export default {
|
||||
return userBalance + groupBalance;
|
||||
},
|
||||
minPrize () {
|
||||
let groupFound;
|
||||
this.groups.forEach(group => {
|
||||
if (group._id === this.workingChallenge.group) {
|
||||
groupFound = group;
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
if (groupFound && groupFound.privacy === 'private') return 0;
|
||||
return 1;
|
||||
if (this.workingChallenge.group === TAVERN_ID) return 1;
|
||||
return 0;
|
||||
},
|
||||
insufficientGemsForTavernChallenge () {
|
||||
let balance = this.user.balance || 0;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
"noChallengeOwnerPopover": "This challenge does not have an owner because the person who created the challenge deleted their account.",
|
||||
"challengeMemberNotFound": "User not found among challenge's members",
|
||||
"onlyGroupLeaderChal": "Only the group leader can create challenges",
|
||||
"tavChalsMinPrize": "Prize must be at least 1 Gem for Tavern challenges.",
|
||||
"tavChalsMinPrize": "Prize must be at least 1 Gem for Public Challenges.",
|
||||
"cantAfford": "You can't afford this prize. Purchase more gems or lower the prize amount.",
|
||||
"challengeIdRequired": "\"challengeId\" must be a valid UUID.",
|
||||
"winnerIdRequired": "\"winnerId\" must be a valid UUID.",
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
"tourMuchMore": "When you're done with tasks, you can form a Party with friends, chat in the shared-interest Guilds, join Challenges, and more!",
|
||||
|
||||
"tourStatsPage": "This is your Stats page! Earn achievements by completing the listed tasks.",
|
||||
"tourTavernPage": "Welcome to the Tavern, an all-ages chat room! You can keep your Dailies from hurting you in case of illness or travel by clicking \"Rest in the Inn.\" Come say hi!",
|
||||
"tourTavernPage": "Welcome to the Tavern, an all-ages chat room! You can keep your Dailies from hurting you in case of illness or travel by clicking \"Pause Damage\". Come say hi!",
|
||||
"tourPartyPage": "Your Party will help you stay accountable. Invite friends to unlock a Quest Scroll!",
|
||||
"tourGuildsPage": "Guilds are common-interest chat groups created by the players, for the players. Browse through the list and join the Guilds that interest you. Be sure to check out the popular Habitica Help: Ask a Question guild, where anyone can ask questions about Habitica!",
|
||||
"tourChallengesPage": "Challenges are themed task lists created by users! Joining a Challenge will add its tasks to your account. Compete against other users to win Gem prizes!",
|
||||
|
||||
Reference in New Issue
Block a user