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-history | |
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-history')
-rw-r--r-- | client/src/app/+my-account/my-account-history/my-account-history.component.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/client/src/app/+my-account/my-account-history/my-account-history.component.ts b/client/src/app/+my-account/my-account-history/my-account-history.component.ts index 6ec4fefe8..394091bad 100644 --- a/client/src/app/+my-account/my-account-history/my-account-history.component.ts +++ b/client/src/app/+my-account/my-account-history/my-account-history.component.ts | |||
@@ -3,7 +3,6 @@ import { ActivatedRoute, Router } from '@angular/router' | |||
3 | import { Location } from '@angular/common' | 3 | import { Location } from '@angular/common' |
4 | import { immutableAssign } from '@app/shared/misc/utils' | 4 | import { immutableAssign } from '@app/shared/misc/utils' |
5 | import { ComponentPagination } from '@app/shared/rest/component-pagination.model' | 5 | import { ComponentPagination } from '@app/shared/rest/component-pagination.model' |
6 | import { NotificationsService } from 'angular2-notifications' | ||
7 | import { AuthService } from '../../core/auth' | 6 | import { AuthService } from '../../core/auth' |
8 | import { ConfirmService } from '../../core/confirm' | 7 | import { ConfirmService } from '../../core/confirm' |
9 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' | 8 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' |
@@ -12,6 +11,7 @@ import { I18n } from '@ngx-translate/i18n-polyfill' | |||
12 | import { ScreenService } from '@app/shared/misc/screen.service' | 11 | import { ScreenService } from '@app/shared/misc/screen.service' |
13 | import { UserHistoryService } from '@app/shared/users/user-history.service' | 12 | import { UserHistoryService } from '@app/shared/users/user-history.service' |
14 | import { UserService } from '@app/shared' | 13 | import { UserService } from '@app/shared' |
14 | import { Notifier } from '@app/core' | ||
15 | 15 | ||
16 | @Component({ | 16 | @Component({ |
17 | selector: 'my-account-history', | 17 | selector: 'my-account-history', |
@@ -36,7 +36,7 @@ export class MyAccountHistoryComponent extends AbstractVideoList implements OnIn | |||
36 | protected route: ActivatedRoute, | 36 | protected route: ActivatedRoute, |
37 | protected authService: AuthService, | 37 | protected authService: AuthService, |
38 | protected userService: UserService, | 38 | protected userService: UserService, |
39 | protected notificationsService: NotificationsService, | 39 | protected notifier: Notifier, |
40 | protected location: Location, | 40 | protected location: Location, |
41 | protected screenService: ScreenService, | 41 | protected screenService: ScreenService, |
42 | protected i18n: I18n, | 42 | protected i18n: I18n, |
@@ -77,12 +77,12 @@ export class MyAccountHistoryComponent extends AbstractVideoList implements OnIn | |||
77 | this.i18n('Videos history is enabled') : | 77 | this.i18n('Videos history is enabled') : |
78 | this.i18n('Videos history is disabled') | 78 | this.i18n('Videos history is disabled') |
79 | 79 | ||
80 | this.notificationsService.success(this.i18n('Success'), message) | 80 | this.notifier.success(message) |
81 | 81 | ||
82 | this.authService.refreshUserInformation() | 82 | this.authService.refreshUserInformation() |
83 | }, | 83 | }, |
84 | 84 | ||
85 | err => this.notificationsService.error(this.i18n('Error'), err.message) | 85 | err => this.notifier.error(err.message) |
86 | ) | 86 | ) |
87 | } | 87 | } |
88 | 88 | ||
@@ -96,12 +96,12 @@ export class MyAccountHistoryComponent extends AbstractVideoList implements OnIn | |||
96 | this.userHistoryService.deleteUserVideosHistory() | 96 | this.userHistoryService.deleteUserVideosHistory() |
97 | .subscribe( | 97 | .subscribe( |
98 | () => { | 98 | () => { |
99 | this.notificationsService.success(this.i18n('Success'), this.i18n('Videos history deleted')) | 99 | this.notifier.success(this.i18n('Videos history deleted')) |
100 | 100 | ||
101 | this.reloadVideos() | 101 | this.reloadVideos() |
102 | }, | 102 | }, |
103 | 103 | ||
104 | err => this.notificationsService.error(this.i18n('Error'), err.message) | 104 | err => this.notifier.error(err.message) |
105 | ) | 105 | ) |
106 | } | 106 | } |
107 | } | 107 | } |