web/flows: always hide static user info when its not set in the flow

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-11-18 21:19:06 +01:00
parent cc3ab141e5
commit 71d144a67e
2 changed files with 5 additions and 3 deletions

View file

@ -14,7 +14,7 @@ export class FormStatic extends AKElement {
userAvatar?: string;
@property()
user = "";
user?: string;
static get styles(): CSSResult[] {
return [
@ -44,6 +44,9 @@ export class FormStatic extends AKElement {
}
render(): TemplateResult {
if (!this.user) {
return html``;
}
return html`
<div class="form-control-static">
<div class="avatar">

View file

@ -59,7 +59,6 @@ export class AccessDeniedStage extends BaseStage<
</header>
<div class="pf-c-login__main-body">
<form class="pf-c-form">
${this.challenge.pendingUser ? html`
<ak-form-static
class="pf-c-form__group"
userAvatar="${this.challenge.pendingUserAvatar}"
@ -70,7 +69,7 @@ export class AccessDeniedStage extends BaseStage<
>${t`Not you?`}</a
>
</div>
</ak-form-static>` : html``}
</ak-form-static>
<div class="pf-c-form__group">
<p class="big-icon">
<i class="pf-icon pf-icon-error-circle-o"></i>