aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-05-15 08:47:47 +0200
committerChocobozzz <me@florianbigard.com>2018-05-15 08:47:47 +0200
commit136cce4d6744bef7fd316b929157c1e4e3984fe3 (patch)
treec084909aff9e8d9cf50898b3534b4fe56170394f /client/src
parentefda99c30f2c04702bf57cc150cdfdd0acccc178 (diff)
downloadPeerTube-136cce4d6744bef7fd316b929157c1e4e3984fe3.tar.gz
PeerTube-136cce4d6744bef7fd316b929157c1e4e3984fe3.tar.zst
PeerTube-136cce4d6744bef7fd316b929157c1e4e3984fe3.zip
Use publishedAt by default in videos sort
Diffstat (limited to 'client/src')
-rw-r--r--client/src/app/shared/video/abstract-video-list.ts4
-rw-r--r--client/src/app/shared/video/sort-field.type.ts1
-rw-r--r--client/src/app/videos/video-list/video-local.component.ts2
-rw-r--r--client/src/app/videos/video-list/video-recently-added.component.ts2
4 files changed, 5 insertions, 4 deletions
diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts
index 642a85f65..d8a4b03af 100644
--- a/client/src/app/shared/video/abstract-video-list.ts
+++ b/client/src/app/shared/video/abstract-video-list.ts
@@ -24,8 +24,8 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
24 itemsPerPage: 10, 24 itemsPerPage: 10,
25 totalItems: null 25 totalItems: null
26 } 26 }
27 sort: VideoSortField = '-createdAt' 27 sort: VideoSortField = '-publishedAt'
28 defaultSort: VideoSortField = '-createdAt' 28 defaultSort: VideoSortField = '-publishedAt'
29 syndicationItems = [] 29 syndicationItems = []
30 30
31 loadOnInit = true 31 loadOnInit = true
diff --git a/client/src/app/shared/video/sort-field.type.ts b/client/src/app/shared/video/sort-field.type.ts
index 2a3ae4ddd..2192745b9 100644
--- a/client/src/app/shared/video/sort-field.type.ts
+++ b/client/src/app/shared/video/sort-field.type.ts
@@ -1,5 +1,6 @@
1export type VideoSortField = 'name' | '-name' 1export type VideoSortField = 'name' | '-name'
2 | 'duration' | '-duration' 2 | 'duration' | '-duration'
3 | 'publishedAt' | '-publishedAt'
3 | 'createdAt' | '-createdAt' 4 | 'createdAt' | '-createdAt'
4 | 'views' | '-views' 5 | 'views' | '-views'
5 | 'likes' | '-likes' 6 | 'likes' | '-likes'
diff --git a/client/src/app/videos/video-list/video-local.component.ts b/client/src/app/videos/video-list/video-local.component.ts
index fd67be67b..abab7504f 100644
--- a/client/src/app/videos/video-list/video-local.component.ts
+++ b/client/src/app/videos/video-list/video-local.component.ts
@@ -17,7 +17,7 @@ import { VideoFilter } from '../../../../../shared/models/videos/video-query.typ
17export class VideoLocalComponent extends AbstractVideoList implements OnInit, OnDestroy { 17export class VideoLocalComponent extends AbstractVideoList implements OnInit, OnDestroy {
18 titlePage = 'Local videos' 18 titlePage = 'Local videos'
19 currentRoute = '/videos/local' 19 currentRoute = '/videos/local'
20 sort = '-createdAt' as VideoSortField 20 sort = '-publishedAt' as VideoSortField
21 filter: VideoFilter = 'local' 21 filter: VideoFilter = 'local'
22 22
23 constructor (protected router: Router, 23 constructor (protected router: Router,
diff --git a/client/src/app/videos/video-list/video-recently-added.component.ts b/client/src/app/videos/video-list/video-recently-added.component.ts
index 535b6e618..d064d9628 100644
--- a/client/src/app/videos/video-list/video-recently-added.component.ts
+++ b/client/src/app/videos/video-list/video-recently-added.component.ts
@@ -16,7 +16,7 @@ import { VideoService } from '../../shared/video/video.service'
16export class VideoRecentlyAddedComponent extends AbstractVideoList implements OnInit, OnDestroy { 16export class VideoRecentlyAddedComponent extends AbstractVideoList implements OnInit, OnDestroy {
17 titlePage = 'Recently added' 17 titlePage = 'Recently added'
18 currentRoute = '/videos/recently-added' 18 currentRoute = '/videos/recently-added'
19 sort: VideoSortField = '-createdAt' 19 sort: VideoSortField = '-publishedAt'
20 20
21 constructor (protected router: Router, 21 constructor (protected router: Router,
22 protected route: ActivatedRoute, 22 protected route: ActivatedRoute,