aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/video-list/video-list.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos/video-list/video-list.component.ts')
-rw-r--r--client/src/app/videos/video-list/video-list.component.ts6
1 files changed, 5 insertions, 1 deletions
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';
2import { ActivatedRoute, Router } from '@angular/router'; 2import { ActivatedRoute, Router } from '@angular/router';
3import { BehaviorSubject } from 'rxjs/BehaviorSubject'; 3import { BehaviorSubject } from 'rxjs/BehaviorSubject';
4 4
5import { NotificationsService } from 'angular2-notifications';
6
5import { 7import {
6 SortField, 8 SortField,
7 Video, 9 Video,
@@ -33,6 +35,7 @@ export class VideoListComponent implements OnInit, OnDestroy {
33 private subSearch: any; 35 private subSearch: any;
34 36
35 constructor( 37 constructor(
38 private notificationsService: NotificationsService,
36 private authService: AuthService, 39 private authService: AuthService,
37 private changeDetector: ChangeDetectorRef, 40 private changeDetector: ChangeDetectorRef,
38 private router: Router, 41 private router: Router,
@@ -91,7 +94,7 @@ export class VideoListComponent implements OnInit, OnDestroy {
91 94
92 this.loading.next(false); 95 this.loading.next(false);
93 }, 96 },
94 error => alert(error.text) 97 error => this.notificationsService.error('Error', error.text)
95 ); 98 );
96 } 99 }
97 100
@@ -107,6 +110,7 @@ export class VideoListComponent implements OnInit, OnDestroy {
107 } 110 }
108 111
109 onRemoved(video: Video) { 112 onRemoved(video: Video) {
113 this.notificationsService.success('Success', `Video ${video.name} deleted.`);
110 this.getVideos(); 114 this.getVideos();
111 } 115 }
112 116