X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=client%2Fsrc%2Fapp%2F%2Bsignup%2F%2Bverify-account%2Fverify-account-ask-send-email%2Fverify-account-ask-send-email.component.ts;h=3bd604b662ca7fdcec0e2071803bd33b676d3668;hb=ba430d7516bc5b1324b60571ba7594460969b7fb;hp=cfd471fa400eaeb210e5930475f9708643246759;hpb=b6a1dd4d1b3b0032f8b968e72cbd074f646e8827;p=github%2FChocobozzz%2FPeerTube.git 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' import { FormReactive, UserService } from '@app/shared' import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' import { UserValidatorsService } from '@app/shared/forms/form-validators/user-validators.service' +import { ServerConfig } from '@shared/models' @Component({ selector: 'my-verify-account-ask-send-email', @@ -13,6 +14,7 @@ import { UserValidatorsService } from '@app/shared/forms/form-validators/user-va }) export class VerifyAccountAskSendEmailComponent extends FormReactive implements OnInit { + private serverConfig: ServerConfig constructor ( protected formValidatorService: FormValidatorService, @@ -27,10 +29,14 @@ export class VerifyAccountAskSendEmailComponent extends FormReactive implements } get requiresEmailVerification () { - return this.serverService.getConfig().signup.requiresEmailVerification + return this.serverConfig.signup.requiresEmailVerification } ngOnInit () { + this.serverConfig = this.serverService.getTmpConfig() + this.serverService.getConfig() + .subscribe(config => this.serverConfig = config) + this.buildForm({ 'verify-email-email': this.userValidatorsService.USER_EMAIL })