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-settings/my-account-settings.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-settings/my-account-settings.component.ts')
-rw-r--r-- | client/src/app/+my-account/my-account-settings/my-account-settings.component.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts b/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts index 62053d97b..f4b954e54 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Component, OnInit, ViewChild } from '@angular/core' | 1 | import { Component, OnInit, ViewChild } from '@angular/core' |
2 | import { NotificationsService } from 'angular2-notifications' | 2 | import { Notifier } from '@app/core' |
3 | import { BytesPipe } from 'ngx-pipes' | 3 | import { BytesPipe } from 'ngx-pipes' |
4 | import { AuthService } from '../../core' | 4 | import { AuthService } from '../../core' |
5 | import { User } from '../../shared' | 5 | import { User } from '../../shared' |
@@ -19,7 +19,7 @@ export class MyAccountSettingsComponent implements OnInit { | |||
19 | constructor ( | 19 | constructor ( |
20 | private userService: UserService, | 20 | private userService: UserService, |
21 | private authService: AuthService, | 21 | private authService: AuthService, |
22 | private notificationsService: NotificationsService, | 22 | private notifier: Notifier, |
23 | private i18n: I18n | 23 | private i18n: I18n |
24 | ) {} | 24 | ) {} |
25 | 25 | ||
@@ -48,12 +48,12 @@ export class MyAccountSettingsComponent implements OnInit { | |||
48 | this.userService.changeAvatar(formData) | 48 | this.userService.changeAvatar(formData) |
49 | .subscribe( | 49 | .subscribe( |
50 | data => { | 50 | data => { |
51 | this.notificationsService.success(this.i18n('Success'), this.i18n('Avatar changed.')) | 51 | this.notifier.success(this.i18n('Avatar changed.')) |
52 | 52 | ||
53 | this.user.updateAccountAvatar(data.avatar) | 53 | this.user.updateAccountAvatar(data.avatar) |
54 | }, | 54 | }, |
55 | 55 | ||
56 | err => this.notificationsService.error(this.i18n('Error'), err.message) | 56 | err => this.notifier.error(err.message) |
57 | ) | 57 | ) |
58 | } | 58 | } |
59 | } | 59 | } |