aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+verify-account
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+verify-account')
-rw-r--r--client/src/app/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts11
-rw-r--r--client/src/app/+verify-account/verify-account-email/verify-account-email.component.html2
-rw-r--r--client/src/app/+verify-account/verify-account-email/verify-account-email.component.ts9
3 files changed, 10 insertions, 12 deletions
diff --git a/client/src/app/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts b/client/src/app/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts
index 995f42ffc..cfd471fa4 100644
--- a/client/src/app/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts
+++ b/client/src/app/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts
@@ -1,9 +1,8 @@
1import { Component, OnInit } from '@angular/core' 1import { Component, OnInit } from '@angular/core'
2import { I18n } from '@ngx-translate/i18n-polyfill' 2import { I18n } from '@ngx-translate/i18n-polyfill'
3import { NotificationsService } from 'angular2-notifications' 3import { Notifier, RedirectService } from '@app/core'
4import { ServerService } from '@app/core/server' 4import { ServerService } from '@app/core/server'
5import { RedirectService } from '@app/core' 5import { FormReactive, UserService } from '@app/shared'
6import { UserService, FormReactive } from '@app/shared'
7import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' 6import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
8import { UserValidatorsService } from '@app/shared/forms/form-validators/user-validators.service' 7import { UserValidatorsService } from '@app/shared/forms/form-validators/user-validators.service'
9 8
@@ -20,7 +19,7 @@ export class VerifyAccountAskSendEmailComponent extends FormReactive implements
20 private userValidatorsService: UserValidatorsService, 19 private userValidatorsService: UserValidatorsService,
21 private userService: UserService, 20 private userService: UserService,
22 private serverService: ServerService, 21 private serverService: ServerService,
23 private notificationsService: NotificationsService, 22 private notifier: Notifier,
24 private redirectService: RedirectService, 23 private redirectService: RedirectService,
25 private i18n: I18n 24 private i18n: I18n
26 ) { 25 ) {
@@ -46,12 +45,12 @@ export class VerifyAccountAskSendEmailComponent extends FormReactive implements
46 'An email with verification link will be sent to {{email}}.', 45 'An email with verification link will be sent to {{email}}.',
47 { email } 46 { email }
48 ) 47 )
49 this.notificationsService.success(this.i18n('Success'), message) 48 this.notifier.success(message)
50 this.redirectService.redirectToHomepage() 49 this.redirectService.redirectToHomepage()
51 }, 50 },
52 51
53 err => { 52 err => {
54 this.notificationsService.error(this.i18n('Error'), err.message) 53 this.notifier.error(err.message)
55 } 54 }
56 ) 55 )
57 } 56 }
diff --git a/client/src/app/+verify-account/verify-account-email/verify-account-email.component.html b/client/src/app/+verify-account/verify-account-email/verify-account-email.component.html
index 30ace5e10..a83d4a3c2 100644
--- a/client/src/app/+verify-account/verify-account-email/verify-account-email.component.html
+++ b/client/src/app/+verify-account/verify-account-email/verify-account-email.component.html
@@ -9,7 +9,7 @@
9 <ng-template #verificationError> 9 <ng-template #verificationError>
10 <div> 10 <div>
11 <span i18n>An error occurred. </span> 11 <span i18n>An error occurred. </span>
12 <a i18n routerLink="/verify-account/ask-email">Request new verification email.</a> 12 <a i18n routerLink="/verify-account/ask-send-email">Request new verification email.</a>
13 </div> 13 </div>
14 </ng-template> 14 </ng-template>
15</div> 15</div>
diff --git a/client/src/app/+verify-account/verify-account-email/verify-account-email.component.ts b/client/src/app/+verify-account/verify-account-email/verify-account-email.component.ts
index 26b3bf4b1..f9ecf664b 100644
--- a/client/src/app/+verify-account/verify-account-email/verify-account-email.component.ts
+++ b/client/src/app/+verify-account/verify-account-email/verify-account-email.component.ts
@@ -1,7 +1,7 @@
1import { Component, OnInit } from '@angular/core' 1import { Component, OnInit } from '@angular/core'
2import { ActivatedRoute, Router } from '@angular/router' 2import { ActivatedRoute, Router } from '@angular/router'
3import { I18n } from '@ngx-translate/i18n-polyfill' 3import { I18n } from '@ngx-translate/i18n-polyfill'
4import { NotificationsService } from 'angular2-notifications' 4import { Notifier } from '@app/core'
5import { UserService } from '@app/shared' 5import { UserService } from '@app/shared'
6 6
7@Component({ 7@Component({
@@ -17,7 +17,7 @@ export class VerifyAccountEmailComponent implements OnInit {
17 17
18 constructor ( 18 constructor (
19 private userService: UserService, 19 private userService: UserService,
20 private notificationsService: NotificationsService, 20 private notifier: Notifier,
21 private router: Router, 21 private router: Router,
22 private route: ActivatedRoute, 22 private route: ActivatedRoute,
23 private i18n: I18n 23 private i18n: I18n
@@ -25,12 +25,11 @@ export class VerifyAccountEmailComponent implements OnInit {
25 } 25 }
26 26
27 ngOnInit () { 27 ngOnInit () {
28
29 this.userId = this.route.snapshot.queryParams['userId'] 28 this.userId = this.route.snapshot.queryParams['userId']
30 this.verificationString = this.route.snapshot.queryParams['verificationString'] 29 this.verificationString = this.route.snapshot.queryParams['verificationString']
31 30
32 if (!this.userId || !this.verificationString) { 31 if (!this.userId || !this.verificationString) {
33 this.notificationsService.error(this.i18n('Error'), this.i18n('Unable to find user id or verification string.')) 32 this.notifier.error(this.i18n('Unable to find user id or verification string.'))
34 } else { 33 } else {
35 this.verifyEmail() 34 this.verifyEmail()
36 } 35 }
@@ -47,7 +46,7 @@ export class VerifyAccountEmailComponent implements OnInit {
47 }, 46 },
48 47
49 err => { 48 err => {
50 this.notificationsService.error(this.i18n('Error'), err.message) 49 this.notifier.error(err.message)
51 } 50 }
52 ) 51 )
53 } 52 }