From db19581fb25a28cd226aa2a411db3b78a72b6f09 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 15 Apr 2022 15:14:32 +0200 Subject: Add ability to sort by global views --- client/src/app/+videos/video-list/videos-list-common-page.component.ts | 3 ++- .../shared/shared-video-miniature/video-filters-header.component.html | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'client/src/app') diff --git a/client/src/app/+videos/video-list/videos-list-common-page.component.ts b/client/src/app/+videos/video-list/videos-list-common-page.component.ts index 32737ef1c..72c7e1ef6 100644 --- a/client/src/app/+videos/video-list/videos-list-common-page.component.ts +++ b/client/src/app/+videos/video-list/videos-list-common-page.component.ts @@ -197,11 +197,12 @@ export class VideosListCommonPageComponent implements OnInit, OnDestroy, Disable return } - if ([ 'hot', 'trending', 'likes' ].includes(sanitizedSort)) { + if ([ 'hot', 'trending', 'likes', 'views' ].includes(sanitizedSort)) { this.title = $localize`Trending` if (sanitizedSort === 'hot') this.titleTooltip = $localize`Videos with the most interactions for recent videos` if (sanitizedSort === 'likes') this.titleTooltip = $localize`Videos that have the most likes` + if (sanitizedSort === 'views') this.titleTooltip = undefined if (sanitizedSort === 'trending') { if (this.trendingDays === 1) this.titleTooltip = $localize`Videos with the most views during the last 24 hours` diff --git a/client/src/app/shared/shared-video-miniature/video-filters-header.component.html b/client/src/app/shared/shared-video-miniature/video-filters-header.component.html index fc34b1b29..a07b8b5ee 100644 --- a/client/src/app/shared/shared-video-miniature/video-filters-header.component.html +++ b/client/src/app/shared/shared-video-miniature/video-filters-header.component.html @@ -48,6 +48,7 @@ Sort by "Recent Views" Sort by "Hot" Sort by "Likes" + Sort by "Global Views" -- cgit v1.2.3