* web: Partial fix for issue where config is not consistently available. * web: Fix issues surrounding controller readiness. * web: Catch abort errors when originating when wrapped by OpenAPI or Sentry. * web: Fix color on dark mode. --------- Co-authored-by: Simonyi Gergő <gergo@goauthentik.io>
33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
TypeScript
import { globalAK } from "#common/global";
|
|
import { applyDocumentTheme } from "#common/theme";
|
|
import { AKElement } from "#elements/Base";
|
|
import { BrandingContextController } from "#elements/controllers/BrandContextController";
|
|
import { ConfigContextController } from "#elements/controllers/ConfigContextController";
|
|
import { ModalOrchestrationController } from "#elements/controllers/ModalOrchestrationController";
|
|
|
|
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
|
|
|
/**
|
|
* The base interface element for the application.
|
|
*/
|
|
export abstract class Interface extends AKElement {
|
|
static styles = [PFBase];
|
|
|
|
constructor() {
|
|
super();
|
|
|
|
const { config, brand } = globalAK();
|
|
|
|
applyDocumentTheme(brand.uiTheme);
|
|
|
|
this.addController(new ConfigContextController(this, config));
|
|
this.addController(new BrandingContextController(this, brand));
|
|
this.addController(new ModalOrchestrationController());
|
|
}
|
|
|
|
public connectedCallback(): void {
|
|
super.connectedCallback();
|
|
this.dataset.akInterfaceRoot = this.tagName.toLowerCase();
|
|
}
|
|
}
|