add hours as sorting options

This commit is contained in:
Ivo Barros 2023-06-17 09:37:03 +01:00
parent 207b19dffe
commit 3ca24607fb
2 changed files with 6 additions and 0 deletions

View file

@ -66,6 +66,9 @@ export class SortSelect extends Component<SortSelectProps, SortSelectState> {
<option disabled aria-hidden="true"> <option disabled aria-hidden="true">
</option> </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={"TopDay"}>{i18n.t("top_day")}</option>
<option value={"TopWeek"}>{i18n.t("top_week")}</option> <option value={"TopWeek"}>{i18n.t("top_week")}</option>
<option value={"TopMonth"}>{i18n.t("top_month")}</option> <option value={"TopMonth"}>{i18n.t("top_month")}</option>

View file

@ -986,6 +986,9 @@ export function commentsToFlatNodes(comments: CommentView[]): CommentNodeI[] {
export function convertCommentSortType(sort: SortType): CommentSortType { export function convertCommentSortType(sort: SortType): CommentSortType {
if ( if (
sort == "TopAll" || sort == "TopAll" ||
sort == "TopHour" ||
sort == "TopSixHour" ||
sort == "TopTwelveHour" ||
sort == "TopDay" || sort == "TopDay" ||
sort == "TopWeek" || sort == "TopWeek" ||
sort == "TopMonth" || sort == "TopMonth" ||