]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/videos/video-list/video-recently-added.component.ts
Design video watch modals
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / video-list / video-recently-added.component.ts
CommitLineData
f3aaa9a9 1import { Component, OnInit } from '@angular/core'
9bf9d2a5
C
2import { ActivatedRoute, Router } from '@angular/router'
3import { NotificationsService } from 'angular2-notifications'
202f6b6c 4import { AbstractVideoList } from '../../shared/video/abstract-video-list'
f3aaa9a9
C
5import { SortField } from '../../shared/video/sort-field.type'
6import { VideoService } from '../../shared/video/video.service'
9bf9d2a5
C
7
8@Component({
9 selector: 'my-videos-recently-added',
202f6b6c
C
10 styleUrls: [ '../../shared/video/abstract-video-list.scss' ],
11 templateUrl: '../../shared/video/abstract-video-list.html'
9bf9d2a5 12})
f3aaa9a9 13export class VideoRecentlyAddedComponent extends AbstractVideoList implements OnInit {
9bf9d2a5 14 titlePage = 'Recently added'
2bbb3412 15 currentRoute = '/videos/recently-added'
f3aaa9a9 16 sort: SortField = '-createdAt'
9bf9d2a5
C
17
18 constructor (protected router: Router,
19 protected route: ActivatedRoute,
20 protected notificationsService: NotificationsService,
21 private videoService: VideoService) {
22 super()
23 }
24
25 ngOnInit () {
26 super.ngOnInit()
27 }
28
9bf9d2a5
C
29 getVideosObservable () {
30 return this.videoService.getVideos(this.pagination, this.sort)
31 }
32}