stages/authenticator_webauthn: fix formatting of card

This commit is contained in:
Jens Langhammer 2021-02-21 21:42:40 +01:00
parent 76c572cf7c
commit acc790f590
1 changed files with 28 additions and 34 deletions

View File

@ -64,7 +64,6 @@ export class WebAuthnAuthenticatorRegisterStage extends BaseStage {
} catch (err) {
throw new Error(gettext(`Server validation of credential failed: ${err}`));
}
this.finishStage();
}
async registerWrapper(): Promise<void> {
@ -80,22 +79,17 @@ export class WebAuthnAuthenticatorRegisterStage extends BaseStage {
});
}
finishStage(): void {
// Mark this stage as done
this.dispatchEvent(
new CustomEvent("ak-flow-submit", {
bubbles: true,
composed: true,
})
);
}
firstUpdated(): void {
this.registerWrapper();
}
render(): TemplateResult {
return html`<div class="">
return html`<header class="pf-c-login__main-header">
<h1 class="pf-c-title pf-m-3xl">
${this.challenge?.title}
</h1>
</header>
<div class="pf-c-login__main-body">
${this.registerRunning ?
html`<div class="pf-c-empty-state__content">
<div class="pf-l-bullseye">
@ -112,13 +106,13 @@ export class WebAuthnAuthenticatorRegisterStage extends BaseStage {
}}>
${gettext("Register device")}
</button>
<button class="pf-c-button pf-m-secondary pf-m-block" @click=${() => {
this.finishStage();
}}>
${gettext("Skip")}
</button>
</div>`}
</div>`;
</div>
</div>
<footer class="pf-c-login__main-footer">
<ul class="pf-c-login__main-footer-links">
</ul>
</footer>`;
}
}