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

View file

@ -64,7 +64,6 @@ export class WebAuthnAuthenticatorRegisterStage extends BaseStage {
} catch (err) { } catch (err) {
throw new Error(gettext(`Server validation of credential failed: ${err}`)); throw new Error(gettext(`Server validation of credential failed: ${err}`));
} }
this.finishStage();
} }
async registerWrapper(): Promise<void> { 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 { firstUpdated(): void {
this.registerWrapper(); this.registerWrapper();
} }
render(): TemplateResult { 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 ? ${this.registerRunning ?
html`<div class="pf-c-empty-state__content"> html`<div class="pf-c-empty-state__content">
<div class="pf-l-bullseye"> <div class="pf-l-bullseye">
@ -112,13 +106,13 @@ export class WebAuthnAuthenticatorRegisterStage extends BaseStage {
}}> }}>
${gettext("Register device")} ${gettext("Register device")}
</button> </button>
<button class="pf-c-button pf-m-secondary pf-m-block" @click=${() => {
this.finishStage();
}}>
${gettext("Skip")}
</button>
</div>`} </div>`}
</div>`; </div>
</div>
<footer class="pf-c-login__main-footer">
<ul class="pf-c-login__main-footer-links">
</ul>
</footer>`;
} }
} }