From: Jay Sitter Date: Sun, 25 Jun 2023 22:08:26 +0000 (-0400) Subject: fix: Move things back to where they were X-Git-Url: http://these/git/%24%7Bsubmission.url%7D?a=commitdiff_plain;h=00d7a8dbb7cd18508c62ed17bb15e5a065d5dc00;p=lemmy-ui.git fix: Move things back to where they were --- diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index 3cc931b..b336730 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -718,94 +718,6 @@ export class PostListing extends Component { {(this.canMod_ || this.canAdmin_) && (
  • {this.modRemoveButton}
  • )} - - {this.canMod_ && ( - <> - {!this.creatorIsMod_ && - (!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_) && - this.creatorIsMod_ && - (!this.state.showConfirmTransferCommunity ? ( -
  • - -
  • - ) : ( - <> -
  • - -
  • -
  • - -
  • -
  • - -
  • - - ))} - {/* Admins can ban from all, and appoint other admins */} - {this.canAdmin_ && ( - <> - {!this.creatorIsAdmin_ && ( - <> - {!isBanned(post_view.creator) ? ( -
  • {modBanButton}
  • - ) : ( -
  • {modUnbanButton}
  • - )} -
  • {purgePersonButton}
  • -
  • {purgePostButton}
  • - - )} - {!isBanned(post_view.creator) && post_view.creator.local && ( -
  • {toggleAdminButton}
  • - )} - - )} @@ -1214,7 +1126,97 @@ export class PostListing extends Component { // TODO: make nicer const post_view = this.postView; return ( - this.state.showAdvanced &&
    + this.state.showAdvanced && ( +
    + {this.canMod_ && ( + <> + {!this.creatorIsMod_ && + (!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_) && + this.creatorIsMod_ && + (!this.state.showConfirmTransferCommunity ? ( +
  • + +
  • + ) : ( + <> +
  • + +
  • +
  • + +
  • +
  • + +
  • + + ))} + {/* Admins can ban from all, and appoint other admins */} + {this.canAdmin_ && ( + <> + {!this.creatorIsAdmin_ && ( + <> + {!isBanned(post_view.creator) ? ( +
  • {this.modBanButton}
  • + ) : ( +
  • {this.modUnbanButton}
  • + )} +
  • {this.purgePersonButton}
  • +
  • {this.purgePostButton}
  • + + )} + {!isBanned(post_view.creator) && post_view.creator.local && ( +
  • {this.toggleAdminButton}
  • + )} + + )} +
    + ) ); }