From 2989628b7913383b39ac34c7db8666a21f8e5037 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 4 Jun 2021 13:31:41 +0200 Subject: Use HTML config when possible --- .../verify-account-ask-send-email.component.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts') 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' import { Notifier, RedirectService, ServerService, UserService } from '@app/core' import { USER_EMAIL_VALIDATOR } from '@app/shared/form-validators/user-validators' import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' -import { ServerConfig } from '@shared/models' @Component({ selector: 'my-verify-account-ask-send-email', @@ -11,7 +10,7 @@ import { ServerConfig } from '@shared/models' }) export class VerifyAccountAskSendEmailComponent extends FormReactive implements OnInit { - private serverConfig: ServerConfig + requiresEmailVerification = false constructor ( protected formValidatorService: FormValidatorService, @@ -19,18 +18,13 @@ export class VerifyAccountAskSendEmailComponent extends FormReactive implements private serverService: ServerService, private notifier: Notifier, private redirectService: RedirectService - ) { + ) { super() } - get requiresEmailVerification () { - return this.serverConfig.signup.requiresEmailVerification - } - ngOnInit () { - this.serverConfig = this.serverService.getTmpConfig() this.serverService.getConfig() - .subscribe(config => this.serverConfig = config) + .subscribe(config => this.requiresEmailVerification = config.signup.requiresEmailVerification) this.buildForm({ 'verify-email-email': USER_EMAIL_VALIDATOR -- cgit v1.2.3