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/+admin/config | |
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/+admin/config')
-rw-r--r-- | client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts index 6eea1cd76..ee877ee31 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts | |||
@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core' | |||
2 | import { ConfigService } from '@app/+admin/config/shared/config.service' | 2 | import { ConfigService } from '@app/+admin/config/shared/config.service' |
3 | import { ServerService } from '@app/core/server/server.service' | 3 | import { ServerService } from '@app/core/server/server.service' |
4 | import { CustomConfigValidatorsService, FormReactive, UserValidatorsService } from '@app/shared' | 4 | import { CustomConfigValidatorsService, FormReactive, UserValidatorsService } from '@app/shared' |
5 | import { NotificationsService } from 'angular2-notifications' | 5 | import { Notifier } from '@app/core' |
6 | import { CustomConfig } from '../../../../../../shared/models/server/custom-config.model' | 6 | import { CustomConfig } from '../../../../../../shared/models/server/custom-config.model' |
7 | import { I18n } from '@ngx-translate/i18n-polyfill' | 7 | import { I18n } from '@ngx-translate/i18n-polyfill' |
8 | import { BuildFormDefaultValues, FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' | 8 | import { BuildFormDefaultValues, FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' |
@@ -25,7 +25,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { | |||
25 | protected formValidatorService: FormValidatorService, | 25 | protected formValidatorService: FormValidatorService, |
26 | private customConfigValidatorsService: CustomConfigValidatorsService, | 26 | private customConfigValidatorsService: CustomConfigValidatorsService, |
27 | private userValidatorsService: UserValidatorsService, | 27 | private userValidatorsService: UserValidatorsService, |
28 | private notificationsService: NotificationsService, | 28 | private notifier: Notifier, |
29 | private configService: ConfigService, | 29 | private configService: ConfigService, |
30 | private serverService: ServerService, | 30 | private serverService: ServerService, |
31 | private i18n: I18n | 31 | private i18n: I18n |
@@ -110,7 +110,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { | |||
110 | this.forceCheck() | 110 | this.forceCheck() |
111 | }, | 111 | }, |
112 | 112 | ||
113 | err => this.notificationsService.error(this.i18n('Error'), err.message) | 113 | err => this.notifier.error(err.message) |
114 | ) | 114 | ) |
115 | } | 115 | } |
116 | 116 | ||
@@ -196,10 +196,10 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { | |||
196 | 196 | ||
197 | this.updateForm() | 197 | this.updateForm() |
198 | 198 | ||
199 | this.notificationsService.success(this.i18n('Success'), this.i18n('Configuration updated.')) | 199 | this.notifier.success(this.i18n('Configuration updated.')) |
200 | }, | 200 | }, |
201 | 201 | ||
202 | err => this.notificationsService.error(this.i18n('Error'), err.message) | 202 | err => this.notifier.error(err.message) |
203 | ) | 203 | ) |
204 | } | 204 | } |
205 | 205 | ||