Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

CommentBox update in Presentation mode #160

Merged
merged 6 commits into from
Jul 26, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,8 @@ export const CommentBox = observer<CommentBoxProps>(

const isRedTeam = !store.appMeta.blueTeam;
const isPresentationMode = store.router.params.view === CampaignViews.PRESENTATION;
const showEditButtons = !isPresentationMode && isRedTeam;
const allowReply = isFullList && isRedTeam;
const showEditButtons = isRedTeam;
const allowReply = !isPresentationMode && isFullList && isRedTeam;
const allowEdit =
(store.auth.userName === annotation?.user || !annotation?.user) && !isAddingCommandToComment && isRedTeam;
const isGrouped = (state.currentCommandIds?.length || 0) > 1;
Expand Down Expand Up @@ -658,7 +658,7 @@ export const CommentBox = observer<CommentBoxProps>(
/>
)}
{allowReply && <Button cy-test="reply" minimal small onClick={() => reply?.()} text="Reply" />}
{allowEdit && (
{allowEdit && !isPresentationMode && (
<>
<Button
cy-test="delete-comment"
Expand Down