From 409c14b5e09e0181852cb305b47fbd3a311b7826 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 19 Mar 2020 11:43:14 -0400 Subject: [PATCH 1/2] Fix ansible deploy. --- ansible/lemmy.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ansible/lemmy.yml b/ansible/lemmy.yml index 8d5e22641..bc01623fc 100644 --- a/ansible/lemmy.yml +++ b/ansible/lemmy.yml @@ -36,13 +36,17 @@ - { src: 'templates/docker-compose.yml', dest: '/lemmy/docker-compose.yml', mode: '0600' } - { src: 'templates/nginx.conf', dest: '/etc/nginx/sites-enabled/lemmy.conf', mode: '0644' } - { src: '../docker/iframely.config.local.js', dest: '/lemmy/iframely.config.local.js', mode: '0600' } + vars: + lemmy_docker_image: "dessalines/lemmy:{{ lookup('file', 'VERSION') }}" + lemmy_port: "8536" + pictshare_port: "8537" + iframely_port: "8538" - name: add config file (only during initial setup) template: src='templates/config.hjson' dest='/lemmy/lemmy.hjson' mode='0600' force='no' owner='1000' group='1000' vars: postgres_password: "{{ lookup('password', 'passwords/{{ inventory_hostname }}/postgres chars=ascii_letters,digits') }}" jwt_password: "{{ lookup('password', 'passwords/{{ inventory_hostname }}/jwt chars=ascii_letters,digits') }}" - lemmy_docker_image: "dessalines/lemmy:{{ lookup('file', 'VERSION') }}" - name: enable and start docker service systemd: From 763c2a46102087dd0456b3f3c98f71b8aa424383 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 19 Mar 2020 11:45:23 -0400 Subject: [PATCH 2/2] Adding loading indicators to save and mark as read. #519 --- ui/src/components/comment-node.tsx | 109 +++++++++++++++++--------- ui/src/components/post-listings.tsx | 3 +- ui/src/components/post.tsx | 2 +- ui/src/components/private-message.tsx | 44 +++++------ 4 files changed, 95 insertions(+), 63 deletions(-) diff --git a/ui/src/components/comment-node.tsx b/ui/src/components/comment-node.tsx index cbe58725c..8809c5b74 100644 --- a/ui/src/components/comment-node.tsx +++ b/ui/src/components/comment-node.tsx @@ -56,6 +56,8 @@ interface CommentNodeState { upvotes: number; downvotes: number; borderColor: string; + readLoading: boolean; + saveLoading: boolean; } interface CommentNodeProps { @@ -97,6 +99,8 @@ export class CommentNode extends Component { borderColor: this.props.node.comment.depth ? colorList[this.props.node.comment.depth % colorList.length] : colorList[0], + readLoading: false, + saveLoading: false, }; constructor(props: any, context: any) { @@ -113,6 +117,8 @@ export class CommentNode extends Component { this.state.upvotes = nextProps.node.comment.upvotes; this.state.downvotes = nextProps.node.comment.downvotes; this.state.score = nextProps.node.comment.score; + this.state.readLoading = false; + this.state.saveLoading = false; this.setState(this.state); } @@ -255,12 +261,16 @@ export class CommentNode extends Component { : i18n.t('mark_as_read') } > - - - + {this.state.readLoading ? ( + this.loadingIcon + ) : ( + + + + )} )} @@ -305,6 +315,28 @@ export class CommentNode extends Component { )} +
  • + +
  • -
  • - - - - - -
  • + {this.props.markable && this.linkBtn} {!this.state.showAdvanced ? (
  • )} -
  • - -
  • + {!this.props.markable && this.linkBtn}
  • -
  • - +
  • )} {this.mine && ( <> -
  • - +
  • -
  • - +
  • )} -
  • - +