diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-01-23 22:32:43 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-01-23 22:32:43 +0100 |
commit | b99290b1d5d736083513fb8f66e91f61bfe07e0b (patch) | |
tree | e0e7fa738ee661a267f5330db35bc46d295f945f /client/src/app/admin/video-abuses/video-abuse-list/video-abuse-list.component.ts | |
parent | 11ac88de40215783835cf6e6259ff0f6cee258dd (diff) | |
download | PeerTube-b99290b1d5d736083513fb8f66e91f61bfe07e0b.tar.gz PeerTube-b99290b1d5d736083513fb8f66e91f61bfe07e0b.tar.zst PeerTube-b99290b1d5d736083513fb8f66e91f61bfe07e0b.zip |
Client: lazy load admin area
Diffstat (limited to 'client/src/app/admin/video-abuses/video-abuse-list/video-abuse-list.component.ts')
-rw-r--r-- | client/src/app/admin/video-abuses/video-abuse-list/video-abuse-list.component.ts | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/client/src/app/admin/video-abuses/video-abuse-list/video-abuse-list.component.ts b/client/src/app/admin/video-abuses/video-abuse-list/video-abuse-list.component.ts deleted file mode 100644 index de58bba3d..000000000 --- a/client/src/app/admin/video-abuses/video-abuse-list/video-abuse-list.component.ts +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | import { setInterval } from 'timers' | ||
2 | import { Component, OnInit } from '@angular/core'; | ||
3 | |||
4 | import { VideoAbuseService, VideoAbuse} from '../../../shared'; | ||
5 | |||
6 | @Component({ | ||
7 | selector: 'my-video-abuse-list', | ||
8 | templateUrl: './video-abuse-list.component.html', | ||
9 | styleUrls: [ './video-abuse-list.component.scss' ] | ||
10 | }) | ||
11 | export class VideoAbuseListComponent implements OnInit { | ||
12 | videoAbuses: VideoAbuse[]; | ||
13 | |||
14 | constructor(private videoAbuseService: VideoAbuseService) { } | ||
15 | |||
16 | ngOnInit() { | ||
17 | this.getVideoAbuses(); | ||
18 | } | ||
19 | |||
20 | buildVideoLink(videoAbuse: VideoAbuse) { | ||
21 | return `/videos/${videoAbuse.videoId}`; | ||
22 | } | ||
23 | |||
24 | private getVideoAbuses() { | ||
25 | this.videoAbuseService.getVideoAbuses().subscribe( | ||
26 | res => this.videoAbuses = res.videoAbuses, | ||
27 | |||
28 | err => alert(err.text) | ||
29 | ); | ||
30 | } | ||
31 | } | ||