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:
parent
cc3ab141e5
commit
71d144a67e
|
@ -14,7 +14,7 @@ export class FormStatic extends AKElement {
|
||||||
userAvatar?: string;
|
userAvatar?: string;
|
||||||
|
|
||||||
@property()
|
@property()
|
||||||
user = "";
|
user?: string;
|
||||||
|
|
||||||
static get styles(): CSSResult[] {
|
static get styles(): CSSResult[] {
|
||||||
return [
|
return [
|
||||||
|
@ -44,6 +44,9 @@ export class FormStatic extends AKElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
render(): TemplateResult {
|
render(): TemplateResult {
|
||||||
|
if (!this.user) {
|
||||||
|
return html``;
|
||||||
|
}
|
||||||
return html`
|
return html`
|
||||||
<div class="form-control-static">
|
<div class="form-control-static">
|
||||||
<div class="avatar">
|
<div class="avatar">
|
||||||
|
|
|
@ -59,7 +59,6 @@ export class AccessDeniedStage extends BaseStage<
|
||||||
</header>
|
</header>
|
||||||
<div class="pf-c-login__main-body">
|
<div class="pf-c-login__main-body">
|
||||||
<form class="pf-c-form">
|
<form class="pf-c-form">
|
||||||
${this.challenge.pendingUser ? html`
|
|
||||||
<ak-form-static
|
<ak-form-static
|
||||||
class="pf-c-form__group"
|
class="pf-c-form__group"
|
||||||
userAvatar="${this.challenge.pendingUserAvatar}"
|
userAvatar="${this.challenge.pendingUserAvatar}"
|
||||||
|
@ -70,7 +69,7 @@ export class AccessDeniedStage extends BaseStage<
|
||||||
>${t`Not you?`}</a
|
>${t`Not you?`}</a
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</ak-form-static>` : html``}
|
</ak-form-static>
|
||||||
<div class="pf-c-form__group">
|
<div class="pf-c-form__group">
|
||||||
<p class="big-icon">
|
<p class="big-icon">
|
||||||
<i class="pf-icon pf-icon-error-circle-o"></i>
|
<i class="pf-icon pf-icon-error-circle-o"></i>
|
||||||
|
|
Reference in a new issue