Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

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

Jlll1bf28e1daf17a
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 a07b8b5eed..fe7a59bdbb 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"
>
<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>
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 8cb1ff5b86..6a968ed5c1 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 5073848b88..7fa07fa734 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' |