diff --git a/src/panels/profile/dialog-ha-mfa-module-setup-flow.ts b/src/panels/profile/dialog-ha-mfa-module-setup-flow.ts index 0ca1b026e6..d886bcba51 100644 --- a/src/panels/profile/dialog-ha-mfa-module-setup-flow.ts +++ b/src/panels/profile/dialog-ha-mfa-module-setup-flow.ts @@ -4,7 +4,7 @@ import { customElement, property, state } from "lit/decorators"; import "../../components/ha-circular-progress"; import "../../components/ha-dialog"; import "../../components/ha-form/ha-form"; -import "../../components/ha-markdown"; +import "../../components/ha-qr-code"; import { autocompleteLoginFields } from "../../data/auth"; import { DataEntryFlowStep, @@ -71,6 +71,7 @@ class HaMfaModuleSetupFlow extends LitElement { if (!this._opened) { return nothing; } + return html` ` : html`${this._step.type === "abort" - ? html` + ${this.hass.localize( `component.auth.mfa_setup.${this._step.handler}.abort.${this._step.reason}` )} - >` +

` : this._step.type === "create_entry" ? html`

${this.hass.localize( @@ -101,18 +100,41 @@ class HaMfaModuleSetupFlow extends LitElement { )}

` : this._step.type === "form" - ? html` + ${this.hass.localize( `component.auth.mfa_setup.${ this._step!.handler }.step.${ (this._step! as DataEntryFlowStepForm).step_id - }.description`, - this._step!.description_placeholders + }.description` )} - > +

+

+ ${this.hass.localize( + `ui.panel.profile.mfa_setup.totp.qr_code` + )} +

+

+ + + + + ${this.hass.localize( + `ui.panel.profile.mfa_setup.totp.key_code` + )} + ${this._step!.description_placeholders!.code} + +

+

+ ${this.hass.localize( + `ui.panel.profile.mfa_setup.totp.verification_code` + )} +

*:last-child { - margin-bottom: revert; - } .init-spinner { padding: 10px 100px 34px; text-align: center;