Skip to content

Commit

Permalink
no loading label for overlay
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Langhammer <[email protected]>
  • Loading branch information
BeryJu committed Aug 16, 2024
1 parent 811acd5 commit fc6c5fd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions web/src/elements/EmptyState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class EmptyState extends AKElement {
fullHeight = false;

@property()
header = "";
header?: string;

static get styles(): CSSResult[] {
return [
Expand Down Expand Up @@ -51,7 +51,7 @@ export class EmptyState extends AKElement {
aria-hidden="true"
></i>`}
<h1 class="pf-c-title pf-m-lg">
${this.loading && this.header === "" ? msg("Loading") : this.header}
${this.loading && this.header === undefined ? msg("Loading") : this.header}
</h1>
<div class="pf-c-empty-state__body">
<slot name="body"></slot>
Expand Down
2 changes: 1 addition & 1 deletion web/src/elements/LoadingOverlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class LoadingOverlay extends AKElement {
}

render(): TemplateResult {
return html`<ak-empty-state ?loading="${true}">
return html`<ak-empty-state loading header="">
<slot name="body" slot="body"></slot>
</ak-empty-state>`;
}
Expand Down
11 changes: 5 additions & 6 deletions web/src/flow/FlowExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,13 +436,12 @@ export class FlowExecutor extends Interface implements StageHost {
alt="authentik Logo"
/>
</div>`;
const fallback = html`${logo}<ak-empty-state loading> </ak-empty-state>`;
if (!this.challenge) {
return fallback;
}
const fallback = html`<ak-empty-state loading> </ak-empty-state>`;
return html`
${this.loading ? html`<ak-loading-overlay></ak-loading-overlay>` : nothing} ${logo}
${until(this.renderChallenge(), fallback)}
${this.loading && this.challenge
? html`<ak-loading-overlay></ak-loading-overlay>`
: nothing}
${logo} ${until(this.renderChallenge(), fallback)}
`;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ export class AuthenticatorSMSStage extends BaseStage<
class="pf-c-form__group"
.errors=${(this.challenge?.responseErrors || {})["code"]}
>
<!-- @ts-ignore -->
<input
type="text"
name="code"
Expand Down

0 comments on commit fc6c5fd

Please sign in to comment.