diff options
Diffstat (limited to 'client/src/app/+signup/+verify-account')
2 files changed, 6 insertions, 14 deletions
diff --git a/client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts b/client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts index 51910471b..b26581d2b 100644 --- a/client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts +++ b/client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts | |||
@@ -1,7 +1,6 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { Notifier, RedirectService, ServerService, UserService } from '@app/core' | 2 | import { Notifier, RedirectService, ServerService, UserService } from '@app/core' |
3 | import { FormReactive, FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms' | 3 | import { FormReactive, FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms' |
4 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
5 | import { ServerConfig } from '@shared/models' | 4 | import { ServerConfig } from '@shared/models' |
6 | 5 | ||
7 | @Component({ | 6 | @Component({ |
@@ -19,9 +18,8 @@ export class VerifyAccountAskSendEmailComponent extends FormReactive implements | |||
19 | private userService: UserService, | 18 | private userService: UserService, |
20 | private serverService: ServerService, | 19 | private serverService: ServerService, |
21 | private notifier: Notifier, | 20 | private notifier: Notifier, |
22 | private redirectService: RedirectService, | 21 | private redirectService: RedirectService |
23 | private i18n: I18n | 22 | ) { |
24 | ) { | ||
25 | super() | 23 | super() |
26 | } | 24 | } |
27 | 25 | ||
@@ -44,11 +42,7 @@ export class VerifyAccountAskSendEmailComponent extends FormReactive implements | |||
44 | this.userService.askSendVerifyEmail(email) | 42 | this.userService.askSendVerifyEmail(email) |
45 | .subscribe( | 43 | .subscribe( |
46 | () => { | 44 | () => { |
47 | const message = this.i18n( | 45 | this.notifier.success($localize`An email with verification link will be sent to ${email}.`) |
48 | 'An email with verification link will be sent to {{email}}.', | ||
49 | { email } | ||
50 | ) | ||
51 | this.notifier.success(message) | ||
52 | this.redirectService.redirectToHomepage() | 46 | this.redirectService.redirectToHomepage() |
53 | }, | 47 | }, |
54 | 48 | ||
diff --git a/client/src/app/+signup/+verify-account/verify-account-email/verify-account-email.component.ts b/client/src/app/+signup/+verify-account/verify-account-email/verify-account-email.component.ts index 586f4e231..acc688ab3 100644 --- a/client/src/app/+signup/+verify-account/verify-account-email/verify-account-email.component.ts +++ b/client/src/app/+signup/+verify-account/verify-account-email/verify-account-email.component.ts | |||
@@ -1,7 +1,6 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { ActivatedRoute } from '@angular/router' | 2 | import { ActivatedRoute } from '@angular/router' |
3 | import { AuthService, Notifier, UserService } from '@app/core' | 3 | import { AuthService, Notifier, UserService } from '@app/core' |
4 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
5 | 4 | ||
6 | @Component({ | 5 | @Component({ |
7 | selector: 'my-verify-account-email', | 6 | selector: 'my-verify-account-email', |
@@ -20,9 +19,8 @@ export class VerifyAccountEmailComponent implements OnInit { | |||
20 | private userService: UserService, | 19 | private userService: UserService, |
21 | private authService: AuthService, | 20 | private authService: AuthService, |
22 | private notifier: Notifier, | 21 | private notifier: Notifier, |
23 | private route: ActivatedRoute, | 22 | private route: ActivatedRoute |
24 | private i18n: I18n | 23 | ) { |
25 | ) { | ||
26 | } | 24 | } |
27 | 25 | ||
28 | ngOnInit () { | 26 | ngOnInit () { |
@@ -32,7 +30,7 @@ export class VerifyAccountEmailComponent implements OnInit { | |||
32 | this.isPendingEmail = queryParams['isPendingEmail'] === 'true' | 30 | this.isPendingEmail = queryParams['isPendingEmail'] === 'true' |
33 | 31 | ||
34 | if (!this.userId || !this.verificationString) { | 32 | if (!this.userId || !this.verificationString) { |
35 | this.notifier.error(this.i18n('Unable to find user id or verification string.')) | 33 | this.notifier.error($localize`Unable to find user id or verification string.`) |
36 | } else { | 34 | } else { |
37 | this.verifyEmail() | 35 | this.verifyEmail() |
38 | } | 36 | } |