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