From: Pavlos Smith <57727226+iByteABit256@users.noreply.github.com> Date: Fri, 4 Aug 2023 20:32:07 +0000 (+0300) Subject: Lemmy 2515 controversial posts and comments (#1727) X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%22https:/nerdica.net/%7Bthis.getImage%28%29%7D?a=commitdiff_plain;h=d923cfa522c19ff7b533e64d4e00438196000246;p=lemmy-ui.git Lemmy 2515 controversial posts and comments (#1727) * Added buttons to be able to sort posts and comments by controversy rank * Added buttons to be able to sort posts and comments by controversy rank * lost changes * Hiding controversial sort if downvotes disabled (unfinished) * Finished hiding sort option correctly * Removed newline * Removed hiding logic for now, this should be included in a future PR * woodpecker re-run * woodpecker re-run * woodpecker re-run * Update lemmy js-client version --------- Co-authored-by: Dessalines Co-authored-by: SleeplessOne1917 --- diff --git a/package.json b/package.json index 27b9cb4..8e3694b 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "inferno-router": "^8.2.2", "inferno-server": "^8.2.2", "jwt-decode": "^3.1.2", - "lemmy-js-client": "0.18.1", + "lemmy-js-client": "0.19.0-rc.1", "lodash.isequal": "^4.5.0", "markdown-it": "^13.0.1", "markdown-it-container": "^3.0.0", diff --git a/src/shared/components/common/comment-sort-select.tsx b/src/shared/components/common/comment-sort-select.tsx index ad4eebf..f911558 100644 --- a/src/shared/components/common/comment-sort-select.tsx +++ b/src/shared/components/common/comment-sort-select.tsx @@ -48,6 +48,9 @@ export class CommentSortSelect extends Component< {I18NextService.i18n.t("sort_type")} , + , diff --git a/src/shared/components/common/sort-select.tsx b/src/shared/components/common/sort-select.tsx index 088f45e..fe9ba4d 100644 --- a/src/shared/components/common/sort-select.tsx +++ b/src/shared/components/common/sort-select.tsx @@ -54,6 +54,9 @@ export class SortSelect extends Component { {I18NextService.i18n.t("active")} , ]} + {!this.props.hideMostComments && [ diff --git a/src/shared/components/post/post.tsx b/src/shared/components/post/post.tsx index 0401228..49e7348 100644 --- a/src/shared/components/post/post.tsx +++ b/src/shared/components/post/post.tsx @@ -478,6 +478,22 @@ export class Post extends Component { > {I18NextService.i18n.t("top")} + +