mirror of https://github.com/Chocobozzz/PeerTube
Add ability to sort by global views
parent
2b0d17ccf4
commit
db19581fb2
|
@ -197,11 +197,12 @@ export class VideosListCommonPageComponent implements OnInit, OnDestroy, Disable
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if ([ 'hot', 'trending', 'likes' ].includes(sanitizedSort)) {
|
if ([ 'hot', 'trending', 'likes', 'views' ].includes(sanitizedSort)) {
|
||||||
this.title = $localize`Trending`
|
this.title = $localize`Trending`
|
||||||
|
|
||||||
if (sanitizedSort === 'hot') this.titleTooltip = $localize`Videos with the most interactions for recent videos`
|
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 === 'likes') this.titleTooltip = $localize`Videos that have the most likes`
|
||||||
|
if (sanitizedSort === 'views') this.titleTooltip = undefined
|
||||||
|
|
||||||
if (sanitizedSort === 'trending') {
|
if (sanitizedSort === 'trending') {
|
||||||
if (this.trendingDays === 1) this.titleTooltip = $localize`Videos with the most views during the last 24 hours`
|
if (this.trendingDays === 1) this.titleTooltip = $localize`Videos with the most views during the last 24 hours`
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
<ng-option i18n *ngIf="isTrendingSortEnabled('most-viewed')" value="-trending">Sort by <strong>"Recent Views"</strong></ng-option>
|
<ng-option i18n *ngIf="isTrendingSortEnabled('most-viewed')" value="-trending">Sort by <strong>"Recent Views"</strong></ng-option>
|
||||||
<ng-option i18n *ngIf="isTrendingSortEnabled('hot')" value="-hot">Sort by <strong>"Hot"</strong></ng-option>
|
<ng-option i18n *ngIf="isTrendingSortEnabled('hot')" value="-hot">Sort by <strong>"Hot"</strong></ng-option>
|
||||||
<ng-option i18n *ngIf="isTrendingSortEnabled('most-liked')" value="-likes">Sort by <strong>"Likes"</strong></ng-option>
|
<ng-option i18n *ngIf="isTrendingSortEnabled('most-liked')" value="-likes">Sort by <strong>"Likes"</strong></ng-option>
|
||||||
|
<ng-option i18n value="-views">Sort by <strong>"Global Views"</strong></ng-option>
|
||||||
</ng-select>
|
</ng-select>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue