From 2f9a052f89fe8d34fedcd2219e644dd51cda5505 Mon Sep 17 00:00:00 2001 From: Richard Date: Fri, 31 Jan 2020 21:52:27 +0100 Subject: usability features This are all the commits from another PR combined into a single commit. --- ui/src/components/community.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ui/src/components/community.tsx') diff --git a/ui/src/components/community.tsx b/ui/src/components/community.tsx index 3c5f6890..30756344 100644 --- a/ui/src/components/community.tsx +++ b/ui/src/components/community.tsx @@ -128,11 +128,11 @@ export class Community extends Component { return (
{this.state.loading ? ( -
+

-

+

) : (
@@ -140,12 +140,12 @@ export class Community extends Component { {this.state.community.title} {this.state.community.removed && ( - # + { i18n.t('removed') } )} {this.state.community.nsfw && ( - # + { i18n.t('nsfw') } )} @@ -192,7 +192,7 @@ export class Community extends Component { class="btn btn-sm btn-secondary mr-1" onClick={linkEvent(this, this.prevPage)} > - # + { i18n.t('prev') } )} {this.state.posts.length == fetchLimit && ( @@ -200,7 +200,7 @@ export class Community extends Component { class="btn btn-sm btn-secondary" onClick={linkEvent(this, this.nextPage)} > - # + { i18n.t('next') } )}
-- cgit v1.2.3 From ac943f8951fe7da86aaa9f41ee879ab670786c86 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sun, 2 Feb 2020 13:50:44 -0500 Subject: Finishing up interpolation rework. --- ui/src/components/community.tsx | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'ui/src/components/community.tsx') diff --git a/ui/src/components/community.tsx b/ui/src/components/community.tsx index 30756344..da456fe5 100644 --- a/ui/src/components/community.tsx +++ b/ui/src/components/community.tsx @@ -14,7 +14,7 @@ import { GetCommunityForm, ListingType, GetPostsResponse, - CreatePostLikeResponse, + PostResponse, WebSocketJsonResponse, } from '../interfaces'; import { WebSocketService, UserService } from '../services'; @@ -28,7 +28,6 @@ import { postRefetchSeconds, toast, } from '../utils'; -import { T } from 'inferno-i18next'; import { i18n } from '../i18next'; interface State { @@ -128,11 +127,11 @@ export class Community extends Component { return (
{this.state.loading ? ( -

+

-

+
) : (
@@ -140,12 +139,12 @@ export class Community extends Component { {this.state.community.title} {this.state.community.removed && ( - { i18n.t('removed') } + {i18n.t('removed')} )} {this.state.community.nsfw && ( - { i18n.t('nsfw') } + {i18n.t('nsfw')} )} @@ -192,7 +191,7 @@ export class Community extends Component { class="btn btn-sm btn-secondary mr-1" onClick={linkEvent(this, this.prevPage)} > - { i18n.t('prev') } + {i18n.t('prev')} )} {this.state.posts.length == fetchLimit && ( @@ -200,7 +199,7 @@ export class Community extends Component { class="btn btn-sm btn-secondary" onClick={linkEvent(this, this.nextPage)} > - { i18n.t('next') } + {i18n.t('next')} )}
@@ -287,7 +286,7 @@ export class Community extends Component { this.state.loading = false; this.setState(this.state); } else if (res.op == UserOperation.CreatePostLike) { - let data = res.data as CreatePostLikeResponse; + let data = res.data as PostResponse; let found = this.state.posts.find(c => c.id == data.post.id); found.my_vote = data.post.my_vote; found.score = data.post.score; -- cgit v1.2.3