From: Dessalines Date: Wed, 4 Mar 2020 19:06:03 +0000 (-0500) Subject: Add score color to bar X-Git-Url: http://these/git/%7B%27/docs/static/gitweb.js?a=commitdiff_plain;h=7c274fdd35b30b645b08740987423bd633e3ba9e;p=lemmy.git Add score color to bar --- diff --git a/ui/src/components/comment-node.tsx b/ui/src/components/comment-node.tsx index 820dd901..cfca0f3b 100644 --- a/ui/src/components/comment-node.tsx +++ b/ui/src/components/comment-node.tsx @@ -181,7 +181,7 @@ export class CommentNode extends Component { })} >
  • - + @@ -1144,4 +1144,14 @@ export class CommentNode extends Component { i.setState(i.state); setupTippy(); } + + get scoreColor() { + if (this.state.my_vote == 1) { + return 'text-info'; + } else if (this.state.my_vote == -1) { + return 'text-danger'; + } else { + return 'text-muted'; + } + } }