diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-12-01 18:56:26 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-12-01 18:56:26 +0100 |
commit | 202f6b6c9dcc9b0aec4b0c1b15e455c22a7952a7 (patch) | |
tree | 605df063371b6be32ca0773bf2917b0c5d9163ae /client/src/app/account/account-videos/account-videos.component.ts | |
parent | c30745f342480b59fb0856a059c8c2fbffbcfc6a (diff) | |
download | PeerTube-202f6b6c9dcc9b0aec4b0c1b15e455c22a7952a7.tar.gz PeerTube-202f6b6c9dcc9b0aec4b0c1b15e455c22a7952a7.tar.zst PeerTube-202f6b6c9dcc9b0aec4b0c1b15e455c22a7952a7.zip |
Begin videos of an account
Diffstat (limited to 'client/src/app/account/account-videos/account-videos.component.ts')
-rw-r--r-- | client/src/app/account/account-videos/account-videos.component.ts | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/client/src/app/account/account-videos/account-videos.component.ts b/client/src/app/account/account-videos/account-videos.component.ts new file mode 100644 index 000000000..ff945825d --- /dev/null +++ b/client/src/app/account/account-videos/account-videos.component.ts | |||
@@ -0,0 +1,35 @@ | |||
1 | import { Component, OnDestroy, OnInit } from '@angular/core' | ||
2 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' | ||
3 | import { ActivatedRoute } from '@angular/router' | ||
4 | import { Router } from '@angular/router' | ||
5 | import { NotificationsService } from 'angular2-notifications' | ||
6 | import { VideoService } from '../../shared/video/video.service' | ||
7 | |||
8 | @Component({ | ||
9 | selector: 'my-account-videos', | ||
10 | templateUrl: './account-videos.component.html', | ||
11 | styleUrls: [ './account-videos.component.scss' ] | ||
12 | }) | ||
13 | export class AccountVideosComponent extends AbstractVideoList implements OnInit, OnDestroy { | ||
14 | titlePage = 'My videos' | ||
15 | currentRoute = '/account/videos' | ||
16 | |||
17 | constructor (protected router: Router, | ||
18 | protected route: ActivatedRoute, | ||
19 | protected notificationsService: NotificationsService, | ||
20 | private videoService: VideoService) { | ||
21 | super() | ||
22 | } | ||
23 | |||
24 | ngOnInit () { | ||
25 | super.ngOnInit() | ||
26 | } | ||
27 | |||
28 | ngOnDestroy () { | ||
29 | super.ngOnDestroy() | ||
30 | } | ||
31 | |||
32 | getVideosObservable () { | ||
33 | return this.videoService.getMyVideos(this.pagination, this.sort) | ||
34 | } | ||
35 | } | ||