aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+signup
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+signup')
-rw-r--r--client/src/app/+signup/+register/register-step-channel.component.ts10
-rw-r--r--client/src/app/+signup/+register/register-step-user.component.ts22
-rw-r--r--client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts6
3 files changed, 22 insertions, 16 deletions
diff --git a/client/src/app/+signup/+register/register-step-channel.component.ts b/client/src/app/+signup/+register/register-step-channel.component.ts
index 8a0120840..d965a7865 100644
--- a/client/src/app/+signup/+register/register-step-channel.component.ts
+++ b/client/src/app/+signup/+register/register-step-channel.component.ts
@@ -3,7 +3,8 @@ import { pairwise } from 'rxjs/operators'
3import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' 3import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
4import { FormGroup } from '@angular/forms' 4import { FormGroup } from '@angular/forms'
5import { UserService } from '@app/core' 5import { UserService } from '@app/core'
6import { FormReactive, FormValidatorService, VideoChannelValidatorsService } from '@app/shared/shared-forms' 6import { VIDEO_CHANNEL_DISPLAY_NAME_VALIDATOR, VIDEO_CHANNEL_NAME_VALIDATOR } from '@app/shared/form-validators/video-channel-validators'
7import { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
7 8
8@Component({ 9@Component({
9 selector: 'my-register-step-channel', 10 selector: 'my-register-step-channel',
@@ -16,8 +17,7 @@ export class RegisterStepChannelComponent extends FormReactive implements OnInit
16 17
17 constructor ( 18 constructor (
18 protected formValidatorService: FormValidatorService, 19 protected formValidatorService: FormValidatorService,
19 private userService: UserService, 20 private userService: UserService
20 private videoChannelValidatorsService: VideoChannelValidatorsService
21 ) { 21 ) {
22 super() 22 super()
23 } 23 }
@@ -28,8 +28,8 @@ export class RegisterStepChannelComponent extends FormReactive implements OnInit
28 28
29 ngOnInit () { 29 ngOnInit () {
30 this.buildForm({ 30 this.buildForm({
31 displayName: this.videoChannelValidatorsService.VIDEO_CHANNEL_DISPLAY_NAME, 31 displayName: VIDEO_CHANNEL_DISPLAY_NAME_VALIDATOR,
32 name: this.videoChannelValidatorsService.VIDEO_CHANNEL_NAME 32 name: VIDEO_CHANNEL_NAME_VALIDATOR
33 }) 33 })
34 34
35 setTimeout(() => this.formBuilt.emit(this.form)) 35 setTimeout(() => this.formBuilt.emit(this.form))
diff --git a/client/src/app/+signup/+register/register-step-user.component.ts b/client/src/app/+signup/+register/register-step-user.component.ts
index 3d9ab8b6b..65536568b 100644
--- a/client/src/app/+signup/+register/register-step-user.component.ts
+++ b/client/src/app/+signup/+register/register-step-user.component.ts
@@ -3,7 +3,14 @@ import { pairwise } from 'rxjs/operators'
3import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' 3import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
4import { FormGroup } from '@angular/forms' 4import { FormGroup } from '@angular/forms'
5import { UserService } from '@app/core' 5import { UserService } from '@app/core'
6import { FormReactive, FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms' 6import {
7 USER_DISPLAY_NAME_REQUIRED_VALIDATOR,
8 USER_EMAIL_VALIDATOR,
9 USER_PASSWORD_VALIDATOR,
10 USER_TERMS_VALIDATOR,
11 USER_USERNAME_VALIDATOR
12} from '@app/shared/form-validators/user-validators'
13import { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
7 14
8@Component({ 15@Component({
9 selector: 'my-register-step-user', 16 selector: 'my-register-step-user',
@@ -19,8 +26,7 @@ export class RegisterStepUserComponent extends FormReactive implements OnInit {
19 26
20 constructor ( 27 constructor (
21 protected formValidatorService: FormValidatorService, 28 protected formValidatorService: FormValidatorService,
22 private userService: UserService, 29 private userService: UserService
23 private userValidatorsService: UserValidatorsService
24 ) { 30 ) {
25 super() 31 super()
26 } 32 }
@@ -31,11 +37,11 @@ export class RegisterStepUserComponent extends FormReactive implements OnInit {
31 37
32 ngOnInit () { 38 ngOnInit () {
33 this.buildForm({ 39 this.buildForm({
34 displayName: this.userValidatorsService.USER_DISPLAY_NAME_REQUIRED, 40 displayName: USER_DISPLAY_NAME_REQUIRED_VALIDATOR,
35 username: this.userValidatorsService.USER_USERNAME, 41 username: USER_USERNAME_VALIDATOR,
36 password: this.userValidatorsService.USER_PASSWORD, 42 password: USER_PASSWORD_VALIDATOR,
37 email: this.userValidatorsService.USER_EMAIL, 43 email: USER_EMAIL_VALIDATOR,
38 terms: this.userValidatorsService.USER_TERMS 44 terms: USER_TERMS_VALIDATOR
39 }) 45 })
40 46
41 setTimeout(() => this.formBuilt.emit(this.form)) 47 setTimeout(() => this.formBuilt.emit(this.form))
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 b26581d2b..830dd9962 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,6 +1,7 @@
1import { Component, OnInit } from '@angular/core' 1import { Component, OnInit } from '@angular/core'
2import { Notifier, RedirectService, ServerService, UserService } from '@app/core' 2import { Notifier, RedirectService, ServerService, UserService } from '@app/core'
3import { FormReactive, FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms' 3import { USER_EMAIL_VALIDATOR } from '@app/shared/form-validators/user-validators'
4import { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
4import { ServerConfig } from '@shared/models' 5import { ServerConfig } from '@shared/models'
5 6
6@Component({ 7@Component({
@@ -14,7 +15,6 @@ export class VerifyAccountAskSendEmailComponent extends FormReactive implements
14 15
15 constructor ( 16 constructor (
16 protected formValidatorService: FormValidatorService, 17 protected formValidatorService: FormValidatorService,
17 private userValidatorsService: UserValidatorsService,
18 private userService: UserService, 18 private userService: UserService,
19 private serverService: ServerService, 19 private serverService: ServerService,
20 private notifier: Notifier, 20 private notifier: Notifier,
@@ -33,7 +33,7 @@ export class VerifyAccountAskSendEmailComponent extends FormReactive implements
33 .subscribe(config => this.serverConfig = config) 33 .subscribe(config => this.serverConfig = config)
34 34
35 this.buildForm({ 35 this.buildForm({
36 'verify-email-email': this.userValidatorsService.USER_EMAIL 36 'verify-email-email': USER_EMAIL_VALIDATOR
37 }) 37 })
38 } 38 }
39 39