From f8b2c1b4f509c037b9650cca2c5befd21f056df3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 19 Dec 2018 16:04:34 +0100 Subject: Refractor notification service Shorter name and use primeng component --- client/src/app/signup/signup.component.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'client/src/app/signup/signup.component.ts') diff --git a/client/src/app/signup/signup.component.ts b/client/src/app/signup/signup.component.ts index 3341d4e09..13941ec79 100644 --- a/client/src/app/signup/signup.component.ts +++ b/client/src/app/signup/signup.component.ts @@ -1,8 +1,7 @@ import { Component, OnInit } from '@angular/core' -import { NotificationsService } from 'angular2-notifications' +import { AuthService, Notifier, RedirectService, ServerService } from '@app/core' import { UserCreate } from '../../../../shared' import { FormReactive, UserService, UserValidatorsService } from '../shared' -import { AuthService, RedirectService, ServerService } from '@app/core' import { I18n } from '@ngx-translate/i18n-polyfill' import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' @@ -20,7 +19,7 @@ export class SignupComponent extends FormReactive implements OnInit { protected formValidatorService: FormValidatorService, private authService: AuthService, private userValidatorsService: UserValidatorsService, - private notificationsService: NotificationsService, + private notifier: Notifier, private userService: UserService, private serverService: ServerService, private redirectService: RedirectService, @@ -64,10 +63,7 @@ export class SignupComponent extends FormReactive implements OnInit { this.authService.login(userCreate.username, userCreate.password) .subscribe( () => { - this.notificationsService.success( - this.i18n('Success'), - this.i18n('You are now logged in as {{username}}!', { username: userCreate.username }) - ) + this.notifier.success(this.i18n('You are now logged in as {{username}}!', { username: userCreate.username })) this.redirectService.redirectToHomepage() }, -- cgit v1.2.3