aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-12-18 15:31:54 +0100
committerChocobozzz <me@florianbigard.com>2019-12-18 15:40:59 +0100
commitba430d7516bc5b1324b60571ba7594460969b7fb (patch)
treedf5c6952c82f49a94c0a884bbc97d4a0cbd9f867 /client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts
parent5dfb7c1dec8222b0bbccac5b56ad46da1438747e (diff)
downloadPeerTube-ba430d7516bc5b1324b60571ba7594460969b7fb.tar.gz
PeerTube-ba430d7516bc5b1324b60571ba7594460969b7fb.tar.zst
PeerTube-ba430d7516bc5b1324b60571ba7594460969b7fb.zip
Lazy load static objects
Diffstat (limited to 'client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts')
-rw-r--r--client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts8
1 files changed, 7 insertions, 1 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 cfd471fa4..3bd604b66 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
@@ -5,6 +5,7 @@ import { ServerService } from '@app/core/server'
5import { FormReactive, UserService } from '@app/shared' 5import { FormReactive, UserService } from '@app/shared'
6import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' 6import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
7import { UserValidatorsService } from '@app/shared/forms/form-validators/user-validators.service' 7import { UserValidatorsService } from '@app/shared/forms/form-validators/user-validators.service'
8import { ServerConfig } from '@shared/models'
8 9
9@Component({ 10@Component({
10 selector: 'my-verify-account-ask-send-email', 11 selector: 'my-verify-account-ask-send-email',
@@ -13,6 +14,7 @@ import { UserValidatorsService } from '@app/shared/forms/form-validators/user-va
13}) 14})
14 15
15export class VerifyAccountAskSendEmailComponent extends FormReactive implements OnInit { 16export class VerifyAccountAskSendEmailComponent extends FormReactive implements OnInit {
17 private serverConfig: ServerConfig
16 18
17 constructor ( 19 constructor (
18 protected formValidatorService: FormValidatorService, 20 protected formValidatorService: FormValidatorService,
@@ -27,10 +29,14 @@ export class VerifyAccountAskSendEmailComponent extends FormReactive implements
27 } 29 }
28 30
29 get requiresEmailVerification () { 31 get requiresEmailVerification () {
30 return this.serverService.getConfig().signup.requiresEmailVerification 32 return this.serverConfig.signup.requiresEmailVerification
31 } 33 }
32 34
33 ngOnInit () { 35 ngOnInit () {
36 this.serverConfig = this.serverService.getTmpConfig()
37 this.serverService.getConfig()
38 .subscribe(config => this.serverConfig = config)
39
34 this.buildForm({ 40 this.buildForm({
35 'verify-email-email': this.userValidatorsService.USER_EMAIL 41 'verify-email-email': this.userValidatorsService.USER_EMAIL
36 }) 42 })