aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+signup
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-04 13:31:41 +0200
committerChocobozzz <me@florianbigard.com>2021-06-04 15:45:44 +0200
commit2989628b7913383b39ac34c7db8666a21f8e5037 (patch)
treeac7759177c04e524e7845143fd685aefb49e810e /client/src/app/+signup
parent8e08d415f9473b6b72fef698729453e726da16e7 (diff)
downloadPeerTube-2989628b7913383b39ac34c7db8666a21f8e5037.tar.gz
PeerTube-2989628b7913383b39ac34c7db8666a21f8e5037.tar.zst
PeerTube-2989628b7913383b39ac34c7db8666a21f8e5037.zip
Use HTML config when possible
Diffstat (limited to 'client/src/app/+signup')
-rw-r--r--client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts12
1 files changed, 3 insertions, 9 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 830dd9962..afb0e6d6c 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
@@ -2,7 +2,6 @@ import { Component, OnInit } from '@angular/core'
2import { Notifier, RedirectService, ServerService, UserService } from '@app/core' 2import { Notifier, RedirectService, ServerService, UserService } from '@app/core'
3import { USER_EMAIL_VALIDATOR } from '@app/shared/form-validators/user-validators' 3import { USER_EMAIL_VALIDATOR } from '@app/shared/form-validators/user-validators'
4import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' 4import { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
5import { ServerConfig } from '@shared/models'
6 5
7@Component({ 6@Component({
8 selector: 'my-verify-account-ask-send-email', 7 selector: 'my-verify-account-ask-send-email',
@@ -11,7 +10,7 @@ import { ServerConfig } from '@shared/models'
11}) 10})
12 11
13export class VerifyAccountAskSendEmailComponent extends FormReactive implements OnInit { 12export class VerifyAccountAskSendEmailComponent extends FormReactive implements OnInit {
14 private serverConfig: ServerConfig 13 requiresEmailVerification = false
15 14
16 constructor ( 15 constructor (
17 protected formValidatorService: FormValidatorService, 16 protected formValidatorService: FormValidatorService,
@@ -19,18 +18,13 @@ export class VerifyAccountAskSendEmailComponent extends FormReactive implements
19 private serverService: ServerService, 18 private serverService: ServerService,
20 private notifier: Notifier, 19 private notifier: Notifier,
21 private redirectService: RedirectService 20 private redirectService: RedirectService
22 ) { 21 ) {
23 super() 22 super()
24 } 23 }
25 24
26 get requiresEmailVerification () {
27 return this.serverConfig.signup.requiresEmailVerification
28 }
29
30 ngOnInit () { 25 ngOnInit () {
31 this.serverConfig = this.serverService.getTmpConfig()
32 this.serverService.getConfig() 26 this.serverService.getConfig()
33 .subscribe(config => this.serverConfig = config) 27 .subscribe(config => this.requiresEmailVerification = config.signup.requiresEmailVerification)
34 28
35 this.buildForm({ 29 this.buildForm({
36 'verify-email-email': USER_EMAIL_VALIDATOR 30 'verify-email-email': USER_EMAIL_VALIDATOR