From: Dessalines Date: Sat, 21 Mar 2020 04:15:45 +0000 (-0400) Subject: Changing comment actions to flex row. Fixes #611 X-Git-Url: http://these/git/%22https:/join-lemmy.org/%24%7Bsite?a=commitdiff_plain;h=32c85599b6b6f407cbc8d2c21846d5bab3c7e0f0;p=lemmy.git Changing comment actions to flex row. Fixes #611 --- diff --git a/ui/src/components/comment-node.tsx b/ui/src/components/comment-node.tsx index b2d04150..7813168b 100644 --- a/ui/src/components/comment-node.tsx +++ b/ui/src/components/comment-node.tsx @@ -147,88 +147,79 @@ export class CommentNode extends Component { this.props.node.comment.parent_id && 'ml-2'}`} > - + )} + + + + + + {this.state.score} + + • + + + + + {/* end of user row */} {this.state.showEdit && ( { )} /> )} -
    +
    {this.props.showContext && this.linkBtn} {this.props.markable && ( -
  • + + )} + {UserService.Instance.user && !this.props.viewOnly && ( + <> -
  • - )} - {UserService.Instance.user && !this.props.viewOnly && ( - <> -
  • + {WebSocketService.Instance.site.enable_downvotes && ( -
  • - {WebSocketService.Instance.site.enable_downvotes && ( -
  • - -
  • )} -
  • - -
  • -
  • + + + {!this.state.showAdvanced ? ( -
  • - {!this.state.showAdvanced ? ( -
  • - -
  • ) : ( <> {!this.myComment && ( -
  • +
  • + )} {!this.props.showContext && this.linkBtn} -
  • - -
  • + + + {this.myComment && ( <> -
  • •
  • -
  • + + + + )} + {/* Admins and mods can remove comments */} + {(this.canMod || this.canAdmin) && ( + <> + {!node.comment.removed ? ( -
  • -
  • + ) : ( -
  • + )} )} - {/* Admins and mods can remove comments */} - {(this.canMod || this.canAdmin) && ( + {/* Mods can ban from community, and appoint as mods to community */} + {this.canMod && ( <> -
  • - {!node.comment.removed ? ( - - {i18n.t('remove')} - + {i18n.t('ban')} + ) : ( - - {i18n.t('restore')} - - )} -
  • - - )} - {/* Mods can ban from community, and appoint as mods to community */} - {this.canMod && ( - <> - {!this.isMod && ( -
  • - {!node.comment.banned_from_community ? ( - - {i18n.t('ban')} - - ) : ( - - {i18n.t('unban')} - - )} -
  • - )} - {!node.comment.banned_from_community && ( -
  • - {!this.state.showConfirmAppointAsMod ? ( - - {this.isMod - ? i18n.t('remove_as_mod') - : i18n.t('appoint_as_mod')} - - ) : ( - <> - - {i18n.t('are_you_sure')} - - - {i18n.t('yes')} - - - {i18n.t('no')} - - - )} -
  • - )} - - )} - {/* Community creators and admins can transfer community to another mod */} - {(this.amCommunityCreator || this.canAdmin) && - this.isMod && ( -
  • - {!this.state.showConfirmTransferCommunity ? ( - + ))} + {!node.comment.banned_from_community && + (!this.state.showConfirmAppointAsMod ? ( + ) : ( <> - + + ))} + + )} + {/* Community creators and admins can transfer community to another mod */} + {(this.amCommunityCreator || this.canAdmin) && + this.isMod && + (!this.state.showConfirmTransferCommunity ? ( + + ) : ( + <> + + + + + ))} {/* Admins can ban from all, and appoint other admins */} {this.canAdmin && ( <> - {!this.isAdmin && ( -
  • - {!node.comment.banned ? ( - - {i18n.t('ban_from_site')} - - ) : ( - + {i18n.t('ban_from_site')} + + ) : ( + + ))} + {!node.comment.banned && + (!this.state.showConfirmAppointAsAdmin ? ( + + ) : ( + <> + +
  • - )} - {!node.comment.banned && ( -
  • - {!this.state.showConfirmAppointAsAdmin ? ( - +
  • - )} + {i18n.t('no')} + + + ))} )} {/* Site Creator can transfer to another admin */} - {this.amSiteCreator && this.isAdmin && ( -
  • - {!this.state.showConfirmTransferSite ? ( - + {i18n.t('transfer_site')} + + ) : ( + <> + +
  • - )} + {i18n.t('yes')} + + + + ))} )} )} -
+ + {/* end of button group */} )} @@ -761,9 +707,9 @@ export class CommentNode extends Component { get linkBtn() { let node = this.props.node; return ( -
  • +
  • + ); }