mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-01 10:09:56 +00:00
add hours as sorting options
This commit is contained in:
parent
207b19dffe
commit
3ca24607fb
2 changed files with 6 additions and 0 deletions
|
@ -66,6 +66,9 @@ export class SortSelect extends Component<SortSelectProps, SortSelectState> {
|
|||
<option disabled aria-hidden="true">
|
||||
─────
|
||||
</option>
|
||||
<option value={"TopHour"}>{i18n.t("top_hour")}</option>
|
||||
<option value={"TopSixHour"}>{i18n.t("top_six_hours")}</option>
|
||||
<option value={"TopTwelveHour"}>{i18n.t("top_twelve_hours")}</option>
|
||||
<option value={"TopDay"}>{i18n.t("top_day")}</option>
|
||||
<option value={"TopWeek"}>{i18n.t("top_week")}</option>
|
||||
<option value={"TopMonth"}>{i18n.t("top_month")}</option>
|
||||
|
|
|
@ -986,6 +986,9 @@ export function commentsToFlatNodes(comments: CommentView[]): CommentNodeI[] {
|
|||
export function convertCommentSortType(sort: SortType): CommentSortType {
|
||||
if (
|
||||
sort == "TopAll" ||
|
||||
sort == "TopHour" ||
|
||||
sort == "TopSixHour" ||
|
||||
sort == "TopTwelveHour" ||
|
||||
sort == "TopDay" ||
|
||||
sort == "TopWeek" ||
|
||||
sort == "TopMonth" ||
|
||||
|
|
Loading…
Reference in a new issue