Added remaining items necessary for captcha // updated login to match 2fa style

This commit is contained in:
Vincent Salucci 2022-03-03 15:28:18 -06:00
parent 2558d9efd0
commit 5be2670739
3 changed files with 20 additions and 5 deletions

View File

@ -65,12 +65,15 @@
</a>
</div>
</div>
<div class="box-content-row" [hidden]="!showCaptcha()">
</div>
</div>
<div class="box last" [hidden]="!showCaptcha()">
<div class="box-content">
<div class="box-content-row">
<iframe id="hcaptcha_iframe" height="80"></iframe>
</div>
</div>
</div>
<div class="buttons with-rows">
<div class="buttons-row">
<button type="submit" class="btn primary block" [disabled]="form.loading" appBlurClick>

View File

@ -5,7 +5,7 @@
[appApiAction]="formPromise"
attr.aria-hidden="{{ showingModal }}"
>
<div class="content">
<div id="content" class="content">
<h1>{{ title }}</h1>
<p *ngIf="selectedProviderType === providerType.Authenticator">
{{ "enterVerificationCodeApp" | i18n }}
@ -100,8 +100,12 @@
</div>
</div>
</div>
<div class="box-content-row" [hidden]="!showCaptcha()">
<iframe id="hcaptcha_iframe" height="80"></iframe>
<div class="box last" [hidden]="!showCaptcha()">
<div class="box-content">
<div class="box-content-row">
<iframe id="hcaptcha_iframe" height="80"></iframe>
</div>
</div>
</div>
<div class="buttons">
<button

View File

@ -80,4 +80,12 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
modal.close();
});
}
async submit() {
await super.submit();
if (this.captchaSiteKey) {
const content = document.getElementById("content") as HTMLDivElement;
content.setAttribute("style", "width:335px");
}
}
}