aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-04-15 15:14:32 +0200
committerChocobozzz <me@florianbigard.com>2022-04-15 15:14:32 +0200
commitdb19581fb25a28cd226aa2a411db3b78a72b6f09 (patch)
tree471ef7510af503a301ee33c58908d379e08565ae /client/src
parent2b0d17ccf46cfdba4103b7287f0dadf289ad4faf (diff)
downloadPeerTube-db19581fb25a28cd226aa2a411db3b78a72b6f09.tar.gz
PeerTube-db19581fb25a28cd226aa2a411db3b78a72b6f09.tar.zst
PeerTube-db19581fb25a28cd226aa2a411db3b78a72b6f09.zip
Add ability to sort by global views
Diffstat (limited to 'client/src')
-rw-r--r--client/src/app/+videos/video-list/videos-list-common-page.component.ts3
-rw-r--r--client/src/app/shared/shared-video-miniature/video-filters-header.component.html1
2 files changed, 3 insertions, 1 deletions
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
197 return 197 return
198 } 198 }
199 199
200 if ([ 'hot', 'trending', 'likes' ].includes(sanitizedSort)) { 200 if ([ 'hot', 'trending', 'likes', 'views' ].includes(sanitizedSort)) {
201 this.title = $localize`Trending` 201 this.title = $localize`Trending`
202 202
203 if (sanitizedSort === 'hot') this.titleTooltip = $localize`Videos with the most interactions for recent videos` 203 if (sanitizedSort === 'hot') this.titleTooltip = $localize`Videos with the most interactions for recent videos`
204 if (sanitizedSort === 'likes') this.titleTooltip = $localize`Videos that have the most likes` 204 if (sanitizedSort === 'likes') this.titleTooltip = $localize`Videos that have the most likes`
205 if (sanitizedSort === 'views') this.titleTooltip = undefined
205 206
206 if (sanitizedSort === 'trending') { 207 if (sanitizedSort === 'trending') {
207 if (this.trendingDays === 1) this.titleTooltip = $localize`Videos with the most views during the last 24 hours` 208 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 @@
48 <ng-option i18n *ngIf="isTrendingSortEnabled('most-viewed')" value="-trending">Sort by <strong>"Recent Views"</strong></ng-option> 48 <ng-option i18n *ngIf="isTrendingSortEnabled('most-viewed')" value="-trending">Sort by <strong>"Recent Views"</strong></ng-option>
49 <ng-option i18n *ngIf="isTrendingSortEnabled('hot')" value="-hot">Sort by <strong>"Hot"</strong></ng-option> 49 <ng-option i18n *ngIf="isTrendingSortEnabled('hot')" value="-hot">Sort by <strong>"Hot"</strong></ng-option>
50 <ng-option i18n *ngIf="isTrendingSortEnabled('most-liked')" value="-likes">Sort by <strong>"Likes"</strong></ng-option> 50 <ng-option i18n *ngIf="isTrendingSortEnabled('most-liked')" value="-likes">Sort by <strong>"Likes"</strong></ng-option>
51 <ng-option i18n value="-views">Sort by <strong>"Global Views"</strong></ng-option>
51 </ng-select> 52 </ng-select>
52 53
53 </div> 54 </div>