diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-01-27 16:14:11 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-01-27 16:14:11 +0100 |
commit | 7ddd02c9b8c1e088f6679a2227f105e6439fc992 (patch) | |
tree | a1ff7af17f2a95abe85a2380834957e44032e8c2 /client/src/app/+admin/video-abuses | |
parent | cddadde81f91219204cec1f4057a191c02a70894 (diff) | |
download | PeerTube-7ddd02c9b8c1e088f6679a2227f105e6439fc992.tar.gz PeerTube-7ddd02c9b8c1e088f6679a2227f105e6439fc992.tar.zst PeerTube-7ddd02c9b8c1e088f6679a2227f105e6439fc992.zip |
Client: better notifications for a beautiful world
Diffstat (limited to 'client/src/app/+admin/video-abuses')
-rw-r--r-- | client/src/app/+admin/video-abuses/video-abuse-list/video-abuse-list.component.ts | 10 |
1 files changed, 7 insertions, 3 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 index de58bba3d..cfd9151b0 100644 --- 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 | |||
@@ -1,6 +1,7 @@ | |||
1 | import { setInterval } from 'timers' | ||
2 | import { Component, OnInit } from '@angular/core'; | 1 | import { Component, OnInit } from '@angular/core'; |
3 | 2 | ||
3 | import { NotificationsService } from 'angular2-notifications'; | ||
4 | |||
4 | import { VideoAbuseService, VideoAbuse} from '../../../shared'; | 5 | import { VideoAbuseService, VideoAbuse} from '../../../shared'; |
5 | 6 | ||
6 | @Component({ | 7 | @Component({ |
@@ -11,7 +12,10 @@ import { VideoAbuseService, VideoAbuse} from '../../../shared'; | |||
11 | export class VideoAbuseListComponent implements OnInit { | 12 | export class VideoAbuseListComponent implements OnInit { |
12 | videoAbuses: VideoAbuse[]; | 13 | videoAbuses: VideoAbuse[]; |
13 | 14 | ||
14 | constructor(private videoAbuseService: VideoAbuseService) { } | 15 | constructor( |
16 | private notificationsService: NotificationsService, | ||
17 | private videoAbuseService: VideoAbuseService | ||
18 | ) { } | ||
15 | 19 | ||
16 | ngOnInit() { | 20 | ngOnInit() { |
17 | this.getVideoAbuses(); | 21 | this.getVideoAbuses(); |
@@ -25,7 +29,7 @@ export class VideoAbuseListComponent implements OnInit { | |||
25 | this.videoAbuseService.getVideoAbuses().subscribe( | 29 | this.videoAbuseService.getVideoAbuses().subscribe( |
26 | res => this.videoAbuses = res.videoAbuses, | 30 | res => this.videoAbuses = res.videoAbuses, |
27 | 31 | ||
28 | err => alert(err.text) | 32 | err => this.notificationsService.error('Error', err.text) |
29 | ); | 33 | ); |
30 | } | 34 | } |
31 | } | 35 | } |