web: fix title not being loaded from config
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> #770
This commit is contained in:
@ -37,12 +37,12 @@ import { WebAuthnAuthenticatorRegisterChallenge } from "./stages/authenticator_w
|
||||
import { CaptchaChallenge } from "./stages/captcha/CaptchaStage";
|
||||
import { StageHost } from "./stages/base";
|
||||
import { Challenge, ChallengeTypeEnum, Config, FlowsApi } from "authentik-api";
|
||||
import { DEFAULT_CONFIG } from "../api/Config";
|
||||
import { config, DEFAULT_CONFIG } from "../api/Config";
|
||||
import { ifDefined } from "lit-html/directives/if-defined";
|
||||
import { until } from "lit-html/directives/until";
|
||||
import { AccessDeniedChallenge } from "./access_denied/FlowAccessDenied";
|
||||
import { PFSize } from "../elements/Spinner";
|
||||
import { TITLE_SUFFIX } from "../constants";
|
||||
import { TITLE_DEFAULT } from "../constants";
|
||||
import { configureSentry } from "../api/Sentry";
|
||||
|
||||
@customElement("ak-flow-executor")
|
||||
@ -99,11 +99,13 @@ export class FlowExecutor extends LitElement implements StageHost {
|
||||
}
|
||||
|
||||
private postUpdate(): void {
|
||||
if (this.challenge?.title) {
|
||||
document.title = `${this.challenge.title} - ${TITLE_SUFFIX}`;
|
||||
} else {
|
||||
document.title = TITLE_SUFFIX;
|
||||
}
|
||||
config().then(config => {
|
||||
if (this.challenge?.title) {
|
||||
document.title = `${this.challenge.title} - ${config.brandingTitle}`;
|
||||
} else {
|
||||
document.title = config.brandingTitle || TITLE_DEFAULT;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
submit<T>(formData?: T): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user