From cd4e0ab3c2cfd615e4771fb9181a31ce237b5ceb Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 8 Jul 2020 01:02:14 -0400 Subject: [PATCH] HTML title bugs. - Fixing HTML titles for some pages. Fixes #801 - Removing WebSocketService.Instance.site, fetching site on demand now. --- ui/src/components/comment-node.tsx | 4 +- ui/src/components/comment-nodes.tsx | 2 + ui/src/components/communities.tsx | 12 ++-- ui/src/components/community-form.tsx | 11 +-- ui/src/components/community.tsx | 28 +++++++- ui/src/components/create-community.tsx | 56 +++++++++++++-- ui/src/components/create-post.tsx | 73 ++++++++++++++++++-- ui/src/components/create-private-message.tsx | 42 +++++++++-- ui/src/components/inbox.tsx | 20 ++++-- ui/src/components/login.tsx | 4 +- ui/src/components/main.tsx | 5 +- ui/src/components/modlog.tsx | 9 +-- ui/src/components/navbar.tsx | 3 - ui/src/components/password_change.tsx | 25 +++---- ui/src/components/post-form.tsx | 25 ++++--- ui/src/components/post-listing.tsx | 6 +- ui/src/components/post-listings.tsx | 4 ++ ui/src/components/post.tsx | 52 ++++++++++---- ui/src/components/private-message-form.tsx | 1 - ui/src/components/search.tsx | 48 ++++++++++--- ui/src/components/sidebar.tsx | 2 + ui/src/components/sponsors.tsx | 38 ++++++++-- ui/src/components/user.tsx | 38 +++++++++- ui/src/services/WebSocketService.ts | 2 - 24 files changed, 397 insertions(+), 113 deletions(-) diff --git a/ui/src/components/comment-node.tsx b/ui/src/components/comment-node.tsx index 155efe8e0..839a01dcc 100644 --- a/ui/src/components/comment-node.tsx +++ b/ui/src/components/comment-node.tsx @@ -73,6 +73,7 @@ interface CommentNodeProps { showCommunity?: boolean; sort?: CommentSortType; sortType?: SortType; + enableDownvotes: boolean; } export class CommentNode extends Component { @@ -279,7 +280,7 @@ export class CommentNode extends Component { {this.state.upvotes} )} - {WebSocketService.Instance.site.enable_downvotes && ( + {this.props.enableDownvotes && (