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