From 7ee49a43f2efa97886a8ce10f965a89582b4605e Mon Sep 17 00:00:00 2001 From: Alys Date: Sat, 30 Sep 2017 06:56:44 +1000 Subject: [PATCH] Various fixes: mods can delete any message; no Report / CopyAsTodo button in inbox; etc (#9091) * fix link to Data Display Tool * prevent the Copy As To-Do button appearing in the inbox because it isn't working * allow mods/staff to delete any chat message * prevent the Flag/Report button appearing in the inbox because it isn't working --- website/client/components/appFooter.vue | 2 +- website/client/components/chat/chatMessages.vue | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/website/client/components/appFooter.vue b/website/client/components/appFooter.vue index 5b99719461..af758df868 100644 --- a/website/client/components/appFooter.vue +++ b/website/client/components/appFooter.vue @@ -55,7 +55,7 @@ li a(href='/apidoc', target='_blank') {{ $t('APIv3') }} li - a(href='http://data.habitrpg.com/?uuid=', target='_blank') {{ $t('dataDisplayTool') }} + a(href='https://oldgods.net/habitrpg/habitrpg_user_data_display.html', target='_blank') {{ $t('dataDisplayTool') }} li a(href='http://habitica.wikia.com/wiki/Guidance_for_Blacksmiths', target='_blank') {{ $t('guidanceForBlacksmiths') }} li diff --git a/website/client/components/chat/chatMessages.vue b/website/client/components/chat/chatMessages.vue index 4eae6e5f7f..fdaca67f42 100644 --- a/website/client/components/chat/chatMessages.vue +++ b/website/client/components/chat/chatMessages.vue @@ -36,13 +36,15 @@ .svg-icon(v-html="icons.like") span(v-if='!msg.likes[user._id]') {{ $t('like') }} span(v-if='msg.likes[user._id]') {{ $t('liked') }} - span.action( @click='copyAsTodo(msg)') + span.action(v-if='!inbox', @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)') + // @TODO make copyAsTodo work in the inbox + span.action(v-if='!inbox && user.flags.communityGuidelinesAccepted', @click='report(msg)') .svg-icon(v-html="icons.report") | {{$t('report')}} - span.action(v-if='msg.uuid === user._id || inbox', @click='remove(msg, index)') + // @TODO make flagging/reporting work in the inbox. NOTE: it must work even if the communityGuidelines are not accepted and it MUST work for messages that you have SENT as well as received. -- Alys + span.action(v-if='msg.uuid === user._id || inbox || user.contributor.admin', @click='remove(msg, index)') .svg-icon(v-html="icons.delete") | {{$t('delete')}} span.action.float-right.liked(v-if='likeCount(msg) > 0') @@ -70,12 +72,15 @@ .svg-icon(v-html="icons.like") span(v-if='!msg.likes[user._id]') {{ $t('like') }} span(v-if='msg.likes[user._id]') {{ $t('liked') }} - span.action( @click='copyAsTodo(msg)') + span.action(v-if='!inbox', @click='copyAsTodo(msg)') .svg-icon(v-html="icons.copy") | {{$t('copyAsTodo')}} + // @TODO make copyAsTodo work in the inbox span.action(v-if='user.flags.communityGuidelinesAccepted', @click='report(msg)') + span.action(v-if='!inbox && user.flags.communityGuidelinesAccepted', @click='report(msg)') .svg-icon(v-html="icons.report") | {{$t('report')}} + // @TODO make flagging/reporting work in the inbox. NOTE: it must work even if the communityGuidelines are not accepted and it MUST work for messages that you have SENT as well as received. -- Alys span.action(v-if='msg.uuid === user._id', @click='remove(msg, index)') .svg-icon(v-html="icons.delete") | {{$t('delete')}}