diff --git a/web/src/flows/FormStatic.ts b/web/src/flows/FormStatic.ts index 44c222817..ae52f6434 100644 --- a/web/src/flows/FormStatic.ts +++ b/web/src/flows/FormStatic.ts @@ -1,10 +1,19 @@ -import { css, CSSResult, customElement, html, LitElement, TemplateResult } from "lit-element"; +import { gettext } from "django"; +import { css, CSSResult, customElement, html, LitElement, property, TemplateResult } from "lit-element"; +import PFAvatar from "@patternfly/patternfly/components/Avatar/avatar.css"; +import { ifDefined } from "lit-html/directives/if-defined"; @customElement("ak-form-static") export class FormStatic extends LitElement { + @property() + userAvatar?: string; + + @property() + user = ""; + static get styles(): CSSResult[] { - return [css` + return [PFAvatar, css` /* Form with user */ .form-control-static { margin-top: var(--pf-global--spacer--sm); @@ -12,7 +21,7 @@ export class FormStatic extends LitElement { align-items: center; justify-content: space-between; } - .form-control-static slot[name=avatar] { + .form-control-static .avatar { display: flex; align-items: center; } @@ -30,7 +39,10 @@ export class FormStatic extends LitElement { render(): TemplateResult { return html`
- +
+ ${gettext( + ${this.user} +
`; diff --git a/web/src/flows/stages/authenticator_static/AuthenticatorStaticStage.ts b/web/src/flows/stages/authenticator_static/AuthenticatorStaticStage.ts index 55b5ac2f4..deeee208d 100644 --- a/web/src/flows/stages/authenticator_static/AuthenticatorStaticStage.ts +++ b/web/src/flows/stages/authenticator_static/AuthenticatorStaticStage.ts @@ -54,11 +54,10 @@ export class AuthenticatorStaticStage extends BaseStage {
{ this.submitForm(e); }}> - -
- ${gettext( - ${this.challenge.pending_user} -
+
${gettext("Not you?")}
diff --git a/web/src/flows/stages/authenticator_totp/AuthenticatorTOTPStage.ts b/web/src/flows/stages/authenticator_totp/AuthenticatorTOTPStage.ts index be9d34853..3a93c8db9 100644 --- a/web/src/flows/stages/authenticator_totp/AuthenticatorTOTPStage.ts +++ b/web/src/flows/stages/authenticator_totp/AuthenticatorTOTPStage.ts @@ -43,11 +43,10 @@ export class AuthenticatorTOTPStage extends BaseStage {