From: Dessalines Date: Mon, 1 Feb 2021 18:48:42 +0000 (-0500) Subject: Add most commented (#159) X-Git-Url: http://these/git/%22https:/join-lemmy.org/static/gitweb.js?a=commitdiff_plain;h=27fd4a4626b60368ae58fd2217e3143fb765f5dd;p=lemmy-ui.git Add most commented (#159) * Adding MostComments sort. * Updating translations. --- diff --git a/src/shared/components/inbox.tsx b/src/shared/components/inbox.tsx index 6c6f5d9..1dae9fd 100644 --- a/src/shared/components/inbox.tsx +++ b/src/shared/components/inbox.tsx @@ -292,6 +292,7 @@ export class Inbox extends Component { sort={this.state.sort} onChange={this.handleSortChange} hideHot + hideMostComments /> ); diff --git a/src/shared/components/search.tsx b/src/shared/components/search.tsx index 65b1a78..1cdd35f 100644 --- a/src/shared/components/search.tsx +++ b/src/shared/components/search.tsx @@ -245,6 +245,7 @@ export class Search extends Component { sort={this.state.sort} onChange={this.handleSortChange} hideHot + hideMostComments /> diff --git a/src/shared/components/sort-select.tsx b/src/shared/components/sort-select.tsx index f711703..ef14a6e 100644 --- a/src/shared/components/sort-select.tsx +++ b/src/shared/components/sort-select.tsx @@ -7,6 +7,7 @@ interface SortSelectProps { sort: SortType; onChange?(val: SortType): any; hideHot?: boolean; + hideMostComments?: boolean; } interface SortSelectState { @@ -41,13 +42,16 @@ export class SortSelect extends Component { class="custom-select w-auto mr-2 mb-2" > - {!this.props.hideHot && ( - - )} - {!this.props.hideHot && ( - - )} + {!this.props.hideHot && [ + , + , + ]} + {!this.props.hideMostComments && ( + + )} diff --git a/src/shared/components/user.tsx b/src/shared/components/user.tsx index 43f872c..e5cd9fe 100644 --- a/src/shared/components/user.tsx +++ b/src/shared/components/user.tsx @@ -382,6 +382,7 @@ export class User extends Component { sort={this.state.sort} onChange={this.handleSortChange} hideHot + hideMostComments />