Use publishedAt by default in videos sort
This commit is contained in:
parent
efda99c30f
commit
136cce4d67
5 changed files with 6 additions and 5 deletions
|
@ -24,8 +24,8 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
|
||||||
itemsPerPage: 10,
|
itemsPerPage: 10,
|
||||||
totalItems: null
|
totalItems: null
|
||||||
}
|
}
|
||||||
sort: VideoSortField = '-createdAt'
|
sort: VideoSortField = '-publishedAt'
|
||||||
defaultSort: VideoSortField = '-createdAt'
|
defaultSort: VideoSortField = '-publishedAt'
|
||||||
syndicationItems = []
|
syndicationItems = []
|
||||||
|
|
||||||
loadOnInit = true
|
loadOnInit = true
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
export type VideoSortField = 'name' | '-name'
|
export type VideoSortField = 'name' | '-name'
|
||||||
| 'duration' | '-duration'
|
| 'duration' | '-duration'
|
||||||
|
| 'publishedAt' | '-publishedAt'
|
||||||
| 'createdAt' | '-createdAt'
|
| 'createdAt' | '-createdAt'
|
||||||
| 'views' | '-views'
|
| 'views' | '-views'
|
||||||
| 'likes' | '-likes'
|
| 'likes' | '-likes'
|
||||||
|
|
|
@ -17,7 +17,7 @@ import { VideoFilter } from '../../../../../shared/models/videos/video-query.typ
|
||||||
export class VideoLocalComponent extends AbstractVideoList implements OnInit, OnDestroy {
|
export class VideoLocalComponent extends AbstractVideoList implements OnInit, OnDestroy {
|
||||||
titlePage = 'Local videos'
|
titlePage = 'Local videos'
|
||||||
currentRoute = '/videos/local'
|
currentRoute = '/videos/local'
|
||||||
sort = '-createdAt' as VideoSortField
|
sort = '-publishedAt' as VideoSortField
|
||||||
filter: VideoFilter = 'local'
|
filter: VideoFilter = 'local'
|
||||||
|
|
||||||
constructor (protected router: Router,
|
constructor (protected router: Router,
|
||||||
|
|
|
@ -16,7 +16,7 @@ import { VideoService } from '../../shared/video/video.service'
|
||||||
export class VideoRecentlyAddedComponent extends AbstractVideoList implements OnInit, OnDestroy {
|
export class VideoRecentlyAddedComponent extends AbstractVideoList implements OnInit, OnDestroy {
|
||||||
titlePage = 'Recently added'
|
titlePage = 'Recently added'
|
||||||
currentRoute = '/videos/recently-added'
|
currentRoute = '/videos/recently-added'
|
||||||
sort: VideoSortField = '-createdAt'
|
sort: VideoSortField = '-publishedAt'
|
||||||
|
|
||||||
constructor (protected router: Router,
|
constructor (protected router: Router,
|
||||||
protected route: ActivatedRoute,
|
protected route: ActivatedRoute,
|
||||||
|
|
|
@ -30,7 +30,7 @@ const SORTABLE_COLUMNS = {
|
||||||
JOBS: [ 'createdAt' ],
|
JOBS: [ 'createdAt' ],
|
||||||
VIDEO_ABUSES: [ 'id', 'createdAt' ],
|
VIDEO_ABUSES: [ 'id', 'createdAt' ],
|
||||||
VIDEO_CHANNELS: [ 'id', 'name', 'updatedAt', 'createdAt' ],
|
VIDEO_CHANNELS: [ 'id', 'name', 'updatedAt', 'createdAt' ],
|
||||||
VIDEOS: [ 'name', 'duration', 'createdAt', 'views', 'likes' ],
|
VIDEOS: [ 'name', 'duration', 'createdAt', 'publishedAt', 'views', 'likes' ],
|
||||||
VIDEO_COMMENT_THREADS: [ 'createdAt' ],
|
VIDEO_COMMENT_THREADS: [ 'createdAt' ],
|
||||||
BLACKLISTS: [ 'id', 'name', 'duration', 'views', 'likes', 'dislikes', 'uuid', 'createdAt' ],
|
BLACKLISTS: [ 'id', 'name', 'duration', 'views', 'likes', 'dislikes', 'uuid', 'createdAt' ],
|
||||||
FOLLOWERS: [ 'createdAt' ],
|
FOLLOWERS: [ 'createdAt' ],
|
||||||
|
|
Loading…
Add table
Reference in a new issue