diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index 449f6963..61561e98 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -982,6 +982,121 @@ export class PostListing extends Component { ); } + get modBanFromCommunityButton() { + return ( + + ); + } + + get modUnbanFromCommunityButton() { + return ( + + ); + } + + get addModToCommunityButton() { + return ( + + ); + } + + get modBanButton() { + return ( + + ); + } + + get modUnbanButton() { + return ( + + ); + } + + get purgePersonButton() { + return ( + + ); + } + + get purgePostButton() { + return ( + + ); + } + + get toggleAdminButton() { + return ( + + ); + } + get modRemoveButton() { const removed = this.postView.post.removed; return ( @@ -1016,54 +1131,14 @@ export class PostListing extends Component { {this.canMod_ && ( <> {!this.creatorIsMod_ && - (!post_view.creator_banned_from_community ? ( - - ) : ( - - ))} - {!post_view.creator_banned_from_community && ( - - )} + (!post_view.creator_banned_from_community + ? this.modBanFromCommunityButton + : this.modUnbanFromCommunityButton)} + {!post_view.creator_banned_from_community && + this.addModToCommunityButton} )} + {/* Community creators and admins can transfer community to another mod */} {(amCommunityCreator(post_view.creator.id, this.props.moderators) || this.canAdmin_) && @@ -1115,62 +1190,16 @@ export class PostListing extends Component { <> {!this.creatorIsAdmin_ && ( <> - {!isBanned(post_view.creator) ? ( - - ) : ( - - )} - - + {!isBanned(post_view.creator) + ? this.modBanButton + : this.modUnbanButton} + {this.purgePersonButton} + {this.purgePostButton} )} - {!isBanned(post_view.creator) && post_view.creator.local && ( - - )} + {!isBanned(post_view.creator) && + post_view.creator.local && + this.toggleAdminButton} )}