mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
review fixes
This commit is contained in:
@@ -15,6 +15,8 @@ div
|
||||
.text(v-markdown='msg.text')
|
||||
.reported(v-if="isMessageReported")
|
||||
span(v-once) {{ $t('reportedMessage')}}
|
||||
br
|
||||
span(v-if="inbox") {{ $t('canDeleteNow') }}
|
||||
hr
|
||||
div(v-if='msg.id')
|
||||
.action(@click='like()', v-if='!inbox && msg.likes', :class='{active: msg.likes[user._id]}')
|
||||
|
||||
@@ -106,7 +106,7 @@ export default {
|
||||
this.$root.$emit('bv::hide::modal', 'report-flag');
|
||||
},
|
||||
async reportAbuse () {
|
||||
this.text('Thank you for reporting this violation. The moderators have been notified.');
|
||||
this.text(this.$t(this.groupId === 'privateMessage' ? 'pmReported' : 'abuseReported'));
|
||||
|
||||
let result = await this.$store.dispatch('chat:flag', {
|
||||
groupId: this.groupId,
|
||||
|
||||
@@ -155,11 +155,13 @@
|
||||
"cannotSendGemsToYourself": "Cannot send gems to yourself. Try a subscription instead.",
|
||||
"badAmountOfGemsToSend": "Amount must be within 1 and your current number of gems.",
|
||||
"report": "Report",
|
||||
"canDeleteNow": "You can now delete the message if you wish.",
|
||||
"abuseFlag": "Report violation of Community Guidelines",
|
||||
"abuseFlagModalHeading": "Report a Violation",
|
||||
"abuseFlagModalBody": "Are you sure you want to report this post? You should <strong>only</strong> report a post that violates the <%= firstLinkStart %>Community Guidelines<%= linkEnd %> and/or <%= secondLinkStart %>Terms of Service<%= linkEnd %>. Inappropriately reporting a post is a violation of the Community Guidelines and may give you an infraction.",
|
||||
"abuseFlagModalButton": "Report Violation",
|
||||
"abuseReported": "Thank you for reporting this violation. The moderators have been notified.",
|
||||
"pmReported": "Thank you for reporting this message. The moderators have been notified. You can now delete the message if you wish.",
|
||||
"abuseAlreadyReported": "You have already reported this message.",
|
||||
"whyReportingPost": "Why are you reporting this post?",
|
||||
"whyReportingPostPlaceholder": "Please help our moderators by letting us know why you are reporting this post for a violation, e.g., spam, swearing, religious oaths, bigotry, slurs, adult topics, violence.",
|
||||
|
||||
@@ -89,6 +89,10 @@ function sendFlagNotification ({
|
||||
});
|
||||
}
|
||||
|
||||
function formatUser (name, email, uuid) {
|
||||
return `${name} (${email}; ${uuid}`;
|
||||
}
|
||||
|
||||
function sendInboxFlagNotification ({
|
||||
authorEmail,
|
||||
flagger,
|
||||
@@ -108,26 +112,22 @@ function sendInboxFlagNotification ({
|
||||
text += ` and commented: ${userComment}`;
|
||||
}
|
||||
|
||||
authorName = `${message.user} - ${authorEmail} - ${message.uuid}`;
|
||||
|
||||
let messageText = message.text;
|
||||
|
||||
if (flagger.id === message.uuid) {
|
||||
messageText += `: ${flagger.profile.name} is writing to itself.`;
|
||||
} else {
|
||||
let sender = '';
|
||||
let recipient = '';
|
||||
|
||||
const flaggerFormat = formatUser(flagger.profile.name, flagger.auth.local.email, flagger._id);
|
||||
const messageUserFormat = formatUser(message.user, authorEmail, message.uuid);
|
||||
|
||||
if (message.sent) {
|
||||
sender = flagger.profile.name;
|
||||
recipient = message.user;
|
||||
sender = flaggerFormat;
|
||||
recipient = messageUserFormat;
|
||||
} else {
|
||||
sender = message.user;
|
||||
recipient = flagger.profile.name;
|
||||
sender = messageUserFormat;
|
||||
recipient = flaggerFormat;
|
||||
}
|
||||
|
||||
messageText += `: ${sender} is writing this message to ${recipient}.`;
|
||||
}
|
||||
authorName = `${sender} is writing this message to ${recipient}.`;
|
||||
|
||||
flagSlack.send({
|
||||
text,
|
||||
|
||||
Reference in New Issue
Block a user