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/login/login.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/login/login.component.ts')
-rw-r--r-- | client/src/app/login/login.component.ts | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/client/src/app/login/login.component.ts b/client/src/app/login/login.component.ts index 18f8f69e5..fc2442c0e 100644 --- a/client/src/app/login/login.component.ts +++ b/client/src/app/login/login.component.ts | |||
@@ -1,7 +1,6 @@ | |||
1 | import { Component, ElementRef, OnInit, ViewChild } from '@angular/core' | 1 | import { Component, ElementRef, OnInit, ViewChild } from '@angular/core' |
2 | import { RedirectService, ServerService } from '@app/core' | 2 | import { Notifier, RedirectService, ServerService } from '@app/core' |
3 | import { UserService } from '@app/shared' | 3 | import { UserService } from '@app/shared' |
4 | import { NotificationsService } from 'angular2-notifications' | ||
5 | import { AuthService } from '../core' | 4 | import { AuthService } from '../core' |
6 | import { FormReactive } from '../shared' | 5 | import { FormReactive } from '../shared' |
7 | import { I18n } from '@ngx-translate/i18n-polyfill' | 6 | import { I18n } from '@ngx-translate/i18n-polyfill' |
@@ -34,7 +33,7 @@ export class LoginComponent extends FormReactive implements OnInit { | |||
34 | private userService: UserService, | 33 | private userService: UserService, |
35 | private serverService: ServerService, | 34 | private serverService: ServerService, |
36 | private redirectService: RedirectService, | 35 | private redirectService: RedirectService, |
37 | private notificationsService: NotificationsService, | 36 | private notifier: Notifier, |
38 | private i18n: I18n | 37 | private i18n: I18n |
39 | ) { | 38 | ) { |
40 | super() | 39 | super() |
@@ -82,11 +81,11 @@ export class LoginComponent extends FormReactive implements OnInit { | |||
82 | 'An email with the reset password instructions will be sent to {{email}}.', | 81 | 'An email with the reset password instructions will be sent to {{email}}.', |
83 | { email: this.forgotPasswordEmail } | 82 | { email: this.forgotPasswordEmail } |
84 | ) | 83 | ) |
85 | this.notificationsService.success(this.i18n('Success'), message) | 84 | this.notifier.success(message) |
86 | this.hideForgotPasswordModal() | 85 | this.hideForgotPasswordModal() |
87 | }, | 86 | }, |
88 | 87 | ||
89 | err => this.notificationsService.error(this.i18n('Error'), err.message) | 88 | err => this.notifier.error(err.message) |
90 | ) | 89 | ) |
91 | } | 90 | } |
92 | 91 | ||