web: fix styling during initial challenge load
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
012a045c8e
commit
ddf09a4cf5
|
@ -32,7 +32,6 @@ import { AuthenticatorStaticChallenge } from "./stages/authenticator_static/Auth
|
||||||
import { AuthenticatorValidateStageChallenge } from "./stages/authenticator_validate/AuthenticatorValidateStage";
|
import { AuthenticatorValidateStageChallenge } from "./stages/authenticator_validate/AuthenticatorValidateStage";
|
||||||
import { WebAuthnAuthenticatorRegisterChallenge } from "./stages/authenticator_webauthn/WebAuthnAuthenticatorRegisterStage";
|
import { WebAuthnAuthenticatorRegisterChallenge } from "./stages/authenticator_webauthn/WebAuthnAuthenticatorRegisterStage";
|
||||||
import { CaptchaChallenge } from "./stages/captcha/CaptchaStage";
|
import { CaptchaChallenge } from "./stages/captcha/CaptchaStage";
|
||||||
import { SpinnerSize } from "../elements/Spinner";
|
|
||||||
import { StageHost } from "./stages/base";
|
import { StageHost } from "./stages/base";
|
||||||
import { Challenge, ChallengeTypeEnum, Config, FlowsApi, RootApi } from "authentik-api";
|
import { Challenge, ChallengeTypeEnum, Config, FlowsApi, RootApi } from "authentik-api";
|
||||||
import { DEFAULT_CONFIG } from "../api/Config";
|
import { DEFAULT_CONFIG } from "../api/Config";
|
||||||
|
@ -157,14 +156,15 @@ export class FlowExecutor extends LitElement implements StageHost {
|
||||||
}
|
}
|
||||||
|
|
||||||
renderLoading(): TemplateResult {
|
renderLoading(): TemplateResult {
|
||||||
return html`<div class="ak-loading">
|
return html`<ak-empty-state
|
||||||
<ak-spinner size=${SpinnerSize.XLarge}></ak-spinner>
|
?loading=${true}
|
||||||
</div>`;
|
header=${gettext("Loading")}>
|
||||||
|
</ak-empty-state>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
renderChallenge(): TemplateResult {
|
renderChallenge(): TemplateResult {
|
||||||
if (!this.challenge) {
|
if (!this.challenge) {
|
||||||
return this.renderLoading();
|
return html``;
|
||||||
}
|
}
|
||||||
switch (this.challenge.type) {
|
switch (this.challenge.type) {
|
||||||
case ChallengeTypeEnum.Redirect:
|
case ChallengeTypeEnum.Redirect:
|
||||||
|
|
Reference in New Issue