From b105c508c03ce3cb96dd8342f96d3291aa197e22 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 31 Aug 2023 14:37:54 +0200 Subject: [PATCH] feat(reports): improve reportview and allow removing content + resolve report automatically Signed-off-by: Thomas Citharel --- js/src/components/Comment/EventComment.vue | 23 +- js/src/graphql/report.ts | 8 + js/src/i18n/en_US.json | 16 +- js/src/i18n/fr_FR.json | 14 +- js/src/views/Moderation/ReportView.vue | 256 +++++++++++++------ lib/federation/activity_pub/types/reports.ex | 5 +- lib/graphql/resolvers/report.ex | 2 +- 7 files changed, 230 insertions(+), 94 deletions(-) diff --git a/js/src/components/Comment/EventComment.vue b/js/src/components/Comment/EventComment.vue index 7219fb2f1..64d87c765 100644 --- a/js/src/components/Comment/EventComment.vue +++ b/js/src/components/Comment/EventComment.vue @@ -4,7 +4,7 @@ :class="{ reply: comment.inReplyToComment, 'bg-mbz-purple-50 dark:bg-mbz-purple-500': comment.isAnnouncement, - 'bg-mbz-bluegreen-50 dark:bg-mbz-bluegreen-600': commentSelected, + '!bg-mbz-bluegreen-50 dark:!bg-mbz-bluegreen-600': commentSelected, 'shadow-none': !rootComment, }" > @@ -62,6 +62,7 @@ class="cursor-pointer flex hover:bg-zinc-300 dark:hover:bg-zinc-600 rounded p-1" v-if=" currentActor?.id && + !readOnly && event.options.commentModeration !== CommentModeration.CLOSED && !comment.deletedAt " @@ -70,7 +71,7 @@ {{ t("Reply") }} - +