From bf28e1daf17abe548459ddd82347c3f0c5f0f24a Mon Sep 17 00:00:00 2001 From: Jlll1 Date: Tue, 24 May 2022 11:42:50 +0200 Subject: [PATCH] (#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 --- .../shared-video-miniature/video-filters-header.component.html | 1 + .../shared-video-miniature/video-filters-header.component.scss | 2 +- shared/models/videos/video-sort-field.type.ts | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) 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 a07b8b5ee..fe7a59bdb 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 @@ -44,6 +44,7 @@ [searchable]="false" > Sort by "Recently Added" + Sort by "Original Publication Date" Sort by "Recent Views" Sort by "Hot" diff --git a/client/src/app/shared/shared-video-miniature/video-filters-header.component.scss b/client/src/app/shared/shared-video-miniature/video-filters-header.component.scss index 8cb1ff5b8..6a968ed5c 100644 --- a/client/src/app/shared/shared-video-miniature/video-filters-header.component.scss +++ b/client/src/app/shared/shared-video-miniature/video-filters-header.component.scss @@ -101,7 +101,7 @@ } .sort { - min-width: 200px; + min-width: 250px; max-width: 300px; height: min-content; diff --git a/shared/models/videos/video-sort-field.type.ts b/shared/models/videos/video-sort-field.type.ts index 5073848b8..7fa07fa73 100644 --- a/shared/models/videos/video-sort-field.type.ts +++ b/shared/models/videos/video-sort-field.type.ts @@ -2,6 +2,7 @@ export type VideoSortField = 'name' | '-name' | 'duration' | '-duration' | 'publishedAt' | '-publishedAt' | + 'originallyPublishedAt' | '-originallyPublishedAt' | 'createdAt' | '-createdAt' | 'views' | '-views' | 'likes' | '-likes' |