From d690e9a73b86f73e36d9c5e8e1261c2b77903f08 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 19 Mar 2020 00:52:08 -0400 Subject: [PATCH] Changing comment action button size. Adding comment dividers. Fixes #604 --- ui/assets/css/main.css | 4 +- ui/src/components/comment-node.tsx | 134 ++++++++++++++--------------- ui/src/components/post-listing.tsx | 74 ++++++++-------- 3 files changed, 103 insertions(+), 109 deletions(-) diff --git a/ui/assets/css/main.css b/ui/assets/css/main.css index 618efa40..1c8206e3 100644 --- a/ui/assets/css/main.css +++ b/ui/assets/css/main.css @@ -152,7 +152,7 @@ svg.thumbnail { } hr { - border-top: 1px solid var(--secondary); + border-top: 1px solid var(--light); } .emoji { @@ -186,7 +186,7 @@ hr { max-height: 90vh; } -.vote-animate:active { +.btn-animate:active { transform: scale(1.2); -webkit-transform: scale(1.2); -ms-transform: scale(1.2); diff --git a/ui/src/components/comment-node.tsx b/ui/src/components/comment-node.tsx index 32e43fdc..cbe58725 100644 --- a/ui/src/components/comment-node.tsx +++ b/ui/src/components/comment-node.tsx @@ -121,18 +121,12 @@ export class CommentNode extends Component { return (
- {!node.comment.parent_id && !this.props.noIndent && ( - <> -
-
- - )}
{ 'ml-2'}`} >
    -
  • +
  • { {i18n.t('banned')}
  • )} +
  • +
    + {this.state.collapsed ? ( + + + + ) : ( + + + + )} +
    +
  • {this.props.showCommunity && (
  • {i18n.t('to')} @@ -212,22 +222,6 @@ export class CommentNode extends Component {
  • -
  • -
    - {this.state.collapsed ? ( - - - - ) : ( - - - - )} -
    -
{this.state.showEdit && ( { )} /> )} -
    +
      {this.props.markable && ( -
    • - +
    • )} {UserService.Instance.user && !this.props.viewOnly && ( <> -
    • +
    • {WebSocketService.Instance.site.enable_downvotes && ( -
    • +
    • )} -
    • - +
    • -
    • +
    • @@ -334,23 +328,23 @@ export class CommentNode extends Component {
    • {!this.state.showAdvanced ? ( -
    • - +
    • ) : ( <> {!this.myComment && ( -
    • +
    • @@ -360,9 +354,9 @@ export class CommentNode extends Component {
    • )} -
    • - +
    • -
    • - +
    • {this.myComment && ( <> -
    • •
    • -
    • - •
    • +
    • +
    • -
    • - +
    • )} {/* Admins and mods can remove comments */} {(this.canMod || this.canAdmin) && ( <> -
    • +
    • {!node.comment.removed ? ( { {this.canMod && ( <> {!this.isMod && ( -
    • +
    • {!node.comment.banned_from_community ? ( {
    • )} {!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 ? ( { {this.canAdmin && ( <> {!this.isAdmin && ( -
    • +
    • {!node.comment.banned ? ( {
    • )} {!node.comment.banned && ( -
    • +
    • {!this.state.showConfirmAppointAsAdmin ? ( { )} {/* Site Creator can transfer to another admin */} {this.amSiteCreator && this.isAdmin && ( -
    • +
    • {!this.state.showConfirmTransferSite ? ( {
      {WebSocketService.Instance.site.enable_downvotes && (
    -
      - {this.props.post.duplicates && ( + {this.props.post.duplicates && ( +
        <>
      • {i18n.t('cross_posted_to')} @@ -515,16 +515,16 @@ export class PostListing extends Component {
      • ))} - )} -
      -
        +
      + )} +
        {UserService.Instance.user && ( <> {this.props.showBody && ( <> -
      • - +
      • -
      • +
      • @@ -553,20 +553,20 @@ export class PostListing extends Component { )} {this.myPost && this.props.showBody && ( <> -
      • - +
      • -
      • - +
      • )} {!this.state.showAdvanced && this.props.showBody ? ( -
      • - +
      • ) : ( <> {this.props.showBody && post.body && ( -
      • - +
      • )} {this.canModOnSelf && ( <> -
      • - +
      • -
      • - +
      • )} -- 2.44.1