diff --git a/flow-typed/Comment.js b/flow-typed/Comment.js index fdfa7880b..43573862b 100644 --- a/flow-typed/Comment.js +++ b/flow-typed/Comment.js @@ -14,6 +14,9 @@ declare type Comment = { is_pinned: boolean, support_amount: number, replies: number, // number of direct replies (i.e. excluding nested replies). + is_moderator: boolean, + is_creator: boolean, + is_global_mod: boolean, is_fiat?: boolean, }; diff --git a/static/app-strings.json b/static/app-strings.json index bb5a2a566..8b6783877 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -1731,6 +1731,7 @@ "Are you sure you want to view this content? Viewing will not unmute @%channel%": "Are you sure you want to view this content? Viewing will not unmute @%channel%", "View Content": "View Content", "Global": "Global", + "Global Admin": "Global Admin", "Moderator": "Moderator", "Global Unblock Channel": "Global Unblock Channel", "Global Block Channel": "Global Block Channel", diff --git a/ui/component/comment/view.jsx b/ui/component/comment/view.jsx index 5161382fa..10604b60a 100644 --- a/ui/component/comment/view.jsx +++ b/ui/component/comment/view.jsx @@ -59,7 +59,9 @@ type Props = { stakedLevel: number, supportAmount: number, numDirectReplies: number, - isFiat: boolean + isModerator: boolean, + isGlobalMod: boolean, + isFiat: boolean, }; const LENGTH_TO_COLLAPSE = 300; @@ -92,6 +94,8 @@ function Comment(props: Props) { stakedLevel, supportAmount, numDirectReplies, + isModerator, + isGlobalMod, isFiat, } = props; @@ -225,6 +229,18 @@ function Comment(props: Props) {
+ {isGlobalMod && ( + + + + )} + + {isModerator && ( + + + + )} + {!author ? ( {__('Anonymous')} ) : ( diff --git a/ui/component/commentsList/view.jsx b/ui/component/commentsList/view.jsx index 01075cf1c..ecccccc88 100644 --- a/ui/component/commentsList/view.jsx +++ b/ui/component/commentsList/view.jsx @@ -311,6 +311,8 @@ function CommentList(props: Props) { isPinned={comment.is_pinned} supportAmount={comment.support_amount} numDirectReplies={comment.replies} + isModerator={comment.is_moderator} + isGlobalMod={comment.is_global_mod} isFiat={comment.is_fiat} /> ); diff --git a/ui/component/commentsReplies/view.jsx b/ui/component/commentsReplies/view.jsx index 932b8c94e..6e78e7dac 100644 --- a/ui/component/commentsReplies/view.jsx +++ b/ui/component/commentsReplies/view.jsx @@ -97,6 +97,8 @@ function CommentsReplies(props: Props) { commentingEnabled={commentingEnabled} supportAmount={comment.support_amount} numDirectReplies={comment.replies} + isModerator={comment.is_moderator} + isGlobalMod={comment.is_global_mod} /> ); })} diff --git a/ui/component/common/icon-custom.jsx b/ui/component/common/icon-custom.jsx index a5f0d2d68..eef84239f 100644 --- a/ui/component/common/icon-custom.jsx +++ b/ui/component/common/icon-custom.jsx @@ -2348,4 +2348,34 @@ export const icons = { ), + [ICONS.BADGE_GLOBAL_MOD]: buildIcon( + + + + + + + + + + + + + ), + [ICONS.BADGE_MOD]: buildIcon( + + + + + + + + + ), }; diff --git a/ui/component/livestreamComment/view.jsx b/ui/component/livestreamComment/view.jsx index cf3b58b14..48d16cf2d 100644 --- a/ui/component/livestreamComment/view.jsx +++ b/ui/component/livestreamComment/view.jsx @@ -20,11 +20,25 @@ type Props = { commentIsMine: boolean, stakedLevel: number, supportAmount: number, + isModerator: boolean, + isGlobalMod: boolean, isFiat: boolean, }; function LivestreamComment(props: Props) { - const { claim, uri, authorUri, message, commentIsMine, commentId, stakedLevel, supportAmount, isFiat } = props; + const { + claim, + uri, + authorUri, + message, + commentIsMine, + commentId, + stakedLevel, + supportAmount, + isModerator, + isGlobalMod, + isFiat, + } = props; const [mouseIsHovering, setMouseHover] = React.useState(false); const commentByOwnerOfContent = claim && claim.signing_channel && claim.signing_channel.permanent_url === authorUri; const { claimName } = parseURI(authorUri); @@ -47,6 +61,18 @@ function LivestreamComment(props: Props) {
{supportAmount > 0 && }
+ {isGlobalMod && ( + + + + )} + + {isModerator && ( + + + + )} +