1
0
Fork 0

(#4959) Add 'Originally Published At' sort option in videos pages (#4977)

* Add Original Publication Date sort dropdown option in video filters

* Make the minimal sort dropdown width 250px to acomodate for 'Originally Published At' option

* Improve label

Co-authored-by: Chocobozzz <me@florianbigard.com>
This commit is contained in:
Jlll1 2022-05-24 11:42:50 +02:00 committed by GitHub
parent 3329325a64
commit bf28e1daf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View File

@ -44,6 +44,7 @@
[searchable]="false"
>
<ng-option i18n value="-publishedAt">Sort by <strong>"Recently Added"</strong></ng-option>
<ng-option i18n value="-originallyPublishedAt">Sort by <strong>"Original Publication Date"</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>

View File

@ -101,7 +101,7 @@
}
.sort {
min-width: 200px;
min-width: 250px;
max-width: 300px;
height: min-content;

View File

@ -2,6 +2,7 @@ export type VideoSortField =
'name' | '-name' |
'duration' | '-duration' |
'publishedAt' | '-publishedAt' |
'originallyPublishedAt' | '-originallyPublishedAt' |
'createdAt' | '-createdAt' |
'views' | '-views' |
'likes' | '-likes' |