diff options
author | Chocobozzz <me@florianbigard.com> | 2018-12-19 16:04:34 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-12-19 17:26:52 +0100 |
commit | f8b2c1b4f509c037b9650cca2c5befd21f056df3 (patch) | |
tree | 89d278f9628d657e6aad1b1e15febaf8ff9fcfa9 /client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts | |
parent | e0e665f0efa98f2701dd9f5529e99989680481ae (diff) | |
download | PeerTube-f8b2c1b4f509c037b9650cca2c5befd21f056df3.tar.gz PeerTube-f8b2c1b4f509c037b9650cca2c5befd21f056df3.tar.zst PeerTube-f8b2c1b4f509c037b9650cca2c5befd21f056df3.zip |
Refractor notification service
Shorter name and use primeng component
Diffstat (limited to 'client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts')
-rw-r--r-- | client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts b/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts index 6d1098865..0ab3e2067 100644 --- a/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts +++ b/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { NotificationsService } from 'angular2-notifications' | 2 | import { Notifier } from '@app/core' |
3 | import { AuthService } from '../../core/auth' | 3 | import { AuthService } from '../../core/auth' |
4 | import { ConfirmService } from '../../core/confirm' | 4 | import { ConfirmService } from '../../core/confirm' |
5 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' | 5 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' |
@@ -20,7 +20,7 @@ export class MyAccountVideoChannelsComponent implements OnInit { | |||
20 | 20 | ||
21 | constructor ( | 21 | constructor ( |
22 | private authService: AuthService, | 22 | private authService: AuthService, |
23 | private notificationsService: NotificationsService, | 23 | private notifier: Notifier, |
24 | private confirmService: ConfirmService, | 24 | private confirmService: ConfirmService, |
25 | private videoChannelService: VideoChannelService, | 25 | private videoChannelService: VideoChannelService, |
26 | private i18n: I18n | 26 | private i18n: I18n |
@@ -46,15 +46,14 @@ export class MyAccountVideoChannelsComponent implements OnInit { | |||
46 | 46 | ||
47 | this.videoChannelService.removeVideoChannel(videoChannel) | 47 | this.videoChannelService.removeVideoChannel(videoChannel) |
48 | .subscribe( | 48 | .subscribe( |
49 | status => { | 49 | () => { |
50 | this.loadVideoChannels() | 50 | this.loadVideoChannels() |
51 | this.notificationsService.success( | 51 | this.notifier.success( |
52 | this.i18n('Success'), | ||
53 | this.i18n('Video channel {{videoChannelName}} deleted.', { videoChannelName: videoChannel.displayName }) | 52 | this.i18n('Video channel {{videoChannelName}} deleted.', { videoChannelName: videoChannel.displayName }) |
54 | ) | 53 | ) |
55 | }, | 54 | }, |
56 | 55 | ||
57 | error => this.notificationsService.error(this.i18n('Error'), error.message) | 56 | error => this.notifier.error(error.message) |
58 | ) | 57 | ) |
59 | } | 58 | } |
60 | 59 | ||