From: Dessalines Date: Fri, 6 Mar 2020 14:55:32 +0000 (-0500) Subject: Some comment-node additions X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/readmes/%22https:/hacktivis.me/%24%7Bsrc%7D?a=commitdiff_plain;h=08af66ba28f38339a5ae655493d3ab299508d910;p=lemmy.git Some comment-node additions - Hiding extra vote counts if no downvotes. - Showing numbers on actions if there are. --- diff --git a/ui/assets/css/main.css b/ui/assets/css/main.css index 53237793..b458a9d2 100644 --- a/ui/assets/css/main.css +++ b/ui/assets/css/main.css @@ -117,7 +117,7 @@ } blockquote { - border-left: 1px solid var(--secondary); + border-left: 2px solid var(--secondary); margin: 0.5em 5px; padding: 0.1em 5px; } diff --git a/ui/src/components/comment-node.tsx b/ui/src/components/comment-node.tsx index db3c589d..524367bc 100644 --- a/ui/src/components/comment-node.tsx +++ b/ui/src/components/comment-node.tsx @@ -125,7 +125,10 @@ export class CommentNode extends Component { }`} > {!node.comment.parent_id && !this.props.noIndent && ( -
+ <> +
+
+ )}
{ style={ !this.props.noIndent && this.props.node.comment.parent_id && - `border-left: 1px ${this.state.borderColor} solid !important` + `border-left: 2px ${this.state.borderColor} solid !important` } >
{ {i18n.t('banned')} )} -
  • •
  • - -
  • - - - - - {this.state.score} - -
  • -
  • - - - - {this.state.upvotes} -
  • -
  • - - - - {this.state.downvotes} -
  • -
    {this.props.showCommunity && (
  • {i18n.t('to')} @@ -219,6 +194,21 @@ export class CommentNode extends Component {
  • )}
  • •
  • +
  • + + + + + {this.state.score} + +
  • +
  • •
  • @@ -230,11 +220,11 @@ export class CommentNode extends Component { onClick={linkEvent(this, this.handleCommentCollapse)} > {this.state.collapsed ? ( - + ) : ( - + )} @@ -292,9 +282,12 @@ export class CommentNode extends Component { onClick={linkEvent(node, this.handleCommentUpvote)} data-tippy-content={i18n.t('upvote')} > - + + {this.state.upvotes !== this.state.score && ( + {this.state.upvotes} + )}
  • {WebSocketService.Instance.site.enable_downvotes && ( @@ -311,9 +304,12 @@ export class CommentNode extends Component { )} data-tippy-content={i18n.t('downvote')} > - + + {this.state.upvotes !== this.state.score && ( + {this.state.downvotes} + )} )} @@ -328,19 +324,6 @@ export class CommentNode extends Component { - {!this.myComment && ( -
  • - - - - - -
  • - )}
  • {
  • ) : ( <> + {!this.myComment && ( +
  • + + + + + +
  • + )}
  • { sortRadios() { return ( -
    +