X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Freset-password%2Freset-password.component.ts;h=07b93ee7383ca28a29cb31d3345d403c3ab601d0;hb=f8b2c1b4f509c037b9650cca2c5befd21f056df3;hp=af1298de613d225d00bf50212e57ec3fd0fdc3ae;hpb=e0e665f0efa98f2701dd9f5529e99989680481ae;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/reset-password/reset-password.component.ts b/client/src/app/reset-password/reset-password.component.ts index af1298de6..07b93ee73 100644 --- a/client/src/app/reset-password/reset-password.component.ts +++ b/client/src/app/reset-password/reset-password.component.ts @@ -1,8 +1,7 @@ import { Component, OnInit } from '@angular/core' import { ActivatedRoute, Router } from '@angular/router' -import { UserService, UserValidatorsService } from '@app/shared' -import { NotificationsService } from 'angular2-notifications' -import { FormReactive } from '../shared' +import { UserService, UserValidatorsService, FormReactive } from '@app/shared' +import { Notifier } from '@app/core' import { I18n } from '@ngx-translate/i18n-polyfill' import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' import { ResetPasswordValidatorsService } from '@app/shared/forms/form-validators/reset-password-validators.service' @@ -22,7 +21,7 @@ export class ResetPasswordComponent extends FormReactive implements OnInit { private resetPasswordValidatorsService: ResetPasswordValidatorsService, private userValidatorsService: UserValidatorsService, private userService: UserService, - private notificationsService: NotificationsService, + private notifier: Notifier, private router: Router, private route: ActivatedRoute, private i18n: I18n @@ -40,7 +39,7 @@ export class ResetPasswordComponent extends FormReactive implements OnInit { this.verificationString = this.route.snapshot.queryParams['verificationString'] if (!this.userId || !this.verificationString) { - this.notificationsService.error(this.i18n('Error'), this.i18n('Unable to find user id or verification string.')) + this.notifier.error(this.i18n('Unable to find user id or verification string.')) this.router.navigate([ '/' ]) } } @@ -49,11 +48,11 @@ export class ResetPasswordComponent extends FormReactive implements OnInit { this.userService.resetPassword(this.userId, this.verificationString, this.form.value.password) .subscribe( () => { - this.notificationsService.success(this.i18n('Success'), this.i18n('Your password has been successfully reset!')) + this.notifier.success(this.i18n('Your password has been successfully reset!')) this.router.navigate([ '/login' ]) }, - err => this.notificationsService.error('Error', err.message) + err => this.notifier.error(err.message) ) }