From 7ce0a34613237d31c3917a48c1996b261f0f75bb Mon Sep 17 00:00:00 2001 From: Huiqing Li Date: Wed, 12 Jul 2023 16:03:35 -0700 Subject: [PATCH 1/4] edit/reply/delete comments in presentation mode --- .../views/Campaign/Explore/components/Comment/CommentBox.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/client/src/views/Campaign/Explore/components/Comment/CommentBox.tsx b/applications/client/src/views/Campaign/Explore/components/Comment/CommentBox.tsx index 0b79447d..90cf9b3f 100644 --- a/applications/client/src/views/Campaign/Explore/components/Comment/CommentBox.tsx +++ b/applications/client/src/views/Campaign/Explore/components/Comment/CommentBox.tsx @@ -397,7 +397,7 @@ export const CommentBox = observer( const isRedTeam = !store.appMeta.blueTeam; const isPresentationMode = store.router.params.view === CampaignViews.PRESENTATION; - const showEditButtons = !isPresentationMode && isRedTeam; + const showEditButtons = isRedTeam; const allowReply = isFullList && isRedTeam; const allowEdit = (store.auth.userName === annotation?.user || !annotation?.user) && !isAddingCommandToComment && isRedTeam; From 9798798ec8d812a3f1cbf3272be0c594972348f0 Mon Sep 17 00:00:00 2001 From: Huiqing Li Date: Thu, 13 Jul 2023 11:02:19 -0700 Subject: [PATCH 2/4] allow edit comment only --- .../views/Campaign/Explore/components/Comment/CommentBox.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/client/src/views/Campaign/Explore/components/Comment/CommentBox.tsx b/applications/client/src/views/Campaign/Explore/components/Comment/CommentBox.tsx index 90cf9b3f..826e253c 100644 --- a/applications/client/src/views/Campaign/Explore/components/Comment/CommentBox.tsx +++ b/applications/client/src/views/Campaign/Explore/components/Comment/CommentBox.tsx @@ -398,7 +398,7 @@ export const CommentBox = observer( const isRedTeam = !store.appMeta.blueTeam; const isPresentationMode = store.router.params.view === CampaignViews.PRESENTATION; const showEditButtons = isRedTeam; - const allowReply = isFullList && isRedTeam; + const allowReply = !isPresentationMode && isFullList && isRedTeam; const allowEdit = (store.auth.userName === annotation?.user || !annotation?.user) && !isAddingCommandToComment && isRedTeam; const isGrouped = (state.currentCommandIds?.length || 0) > 1; @@ -658,7 +658,7 @@ export const CommentBox = observer( /> )} {allowReply &&