X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fvideos%2Fvideo-list%2Fvideo-list.component.ts;h=b3780f8b66ead38076bc5ad13aa9ecf004891ba7;hb=7ddd02c9b8c1e088f6679a2227f105e6439fc992;hp=6c42ba5be573db10c429c244b9cd3e1550228e7f;hpb=cddadde81f91219204cec1f4057a191c02a70894;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/videos/video-list/video-list.component.ts b/client/src/app/videos/video-list/video-list.component.ts index 6c42ba5be..b3780f8b6 100644 --- a/client/src/app/videos/video-list/video-list.component.ts +++ b/client/src/app/videos/video-list/video-list.component.ts @@ -2,6 +2,8 @@ import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { BehaviorSubject } from 'rxjs/BehaviorSubject'; +import { NotificationsService } from 'angular2-notifications'; + import { SortField, Video, @@ -33,6 +35,7 @@ export class VideoListComponent implements OnInit, OnDestroy { private subSearch: any; constructor( + private notificationsService: NotificationsService, private authService: AuthService, private changeDetector: ChangeDetectorRef, private router: Router, @@ -91,7 +94,7 @@ export class VideoListComponent implements OnInit, OnDestroy { this.loading.next(false); }, - error => alert(error.text) + error => this.notificationsService.error('Error', error.text) ); } @@ -107,6 +110,7 @@ export class VideoListComponent implements OnInit, OnDestroy { } onRemoved(video: Video) { + this.notificationsService.success('Success', `Video ${video.name} deleted.`); this.getVideos(); }