]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/account/account-videos/account-videos.component.ts
cc28f511ae600752de1254e3db3dae16c9c1bb3b
[github/Chocobozzz/PeerTube.git] / client / src / app / account / account-videos / account-videos.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 { AbstractVideoList } from '../../shared/video/abstract-video-list'
5 import { VideoService } from '../../shared/video/video.service'
6
7 @Component({
8 selector: 'my-account-videos',
9 templateUrl: './account-videos.component.html',
10 styleUrls: [ './account-videos.component.scss' ]
11 })
12 export class AccountVideosComponent extends AbstractVideoList implements OnInit, OnDestroy {
13 titlePage = 'My videos'
14 currentRoute = '/account/videos'
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.getMyVideos(this.pagination, this.sort)
33 }
34 }