mirror of
https://github.com/goauthentik/authentik
synced 2026-04-25 17:15:26 +02:00
* web: Fix stale notifications. * Fix overlap of API and notifications drawers. * Fix issues surrounding duplicate context controller values. * Clean up drawer events, alignment. * Export parts. Fix z-index, colors. * Fix formatting, alignment. repeated renders. * Fix indent. * Fix progress bar fade out, positioning, labels. * Fix clickable area. * Ignore clickable icons. * Clean up logging. * Fix width. * Move event listeners into decorator. * Fix double counting of notifications. * Fix ARIA lables. * Fix empty state ARIA. * Fix order of locale updating. * Fix rebase. * web: fix notification count update * Update selector. * web: Fix CAPTCHA locale. * Clean up logging. --------- Co-authored-by: macmoritz <tratarmoritz@gmail.com>
48 lines
1.7 KiB
TypeScript
48 lines
1.7 KiB
TypeScript
import { globalAK } from "#common/global";
|
|
import { applyDocumentTheme, createUIThemeEffect } from "#common/theme";
|
|
|
|
import { AKElement } from "#elements/Base";
|
|
import { BrandingContextController } from "#elements/controllers/BrandContextController";
|
|
import { ConfigContextController } from "#elements/controllers/ConfigContextController";
|
|
import { ContextControllerRegistry } from "#elements/controllers/ContextControllerRegistry";
|
|
import { LocaleContextController } from "#elements/controllers/LocaleContextController";
|
|
import { ModalOrchestrationController } from "#elements/controllers/ModalOrchestrationController";
|
|
import { ReactiveContextController } from "#elements/types";
|
|
|
|
import { Context, ContextType } from "@lit/context";
|
|
import { ReactiveController } from "lit";
|
|
|
|
/**
|
|
* The base interface element for the application.
|
|
*/
|
|
export abstract class Interface extends AKElement {
|
|
constructor() {
|
|
super();
|
|
|
|
const { config, brand, locale } = globalAK();
|
|
|
|
createUIThemeEffect(applyDocumentTheme);
|
|
|
|
this.addController(new LocaleContextController(this, locale));
|
|
this.addController(new ConfigContextController(this, config));
|
|
this.addController(new BrandingContextController(this, brand));
|
|
this.addController(new ModalOrchestrationController());
|
|
}
|
|
|
|
public override addController(
|
|
controller: ReactiveController,
|
|
registryKey?: ContextType<Context<unknown, unknown>>,
|
|
): void {
|
|
super.addController(controller);
|
|
|
|
if (registryKey) {
|
|
ContextControllerRegistry.set(registryKey, controller as ReactiveContextController);
|
|
}
|
|
}
|
|
|
|
public connectedCallback(): void {
|
|
super.connectedCallback();
|
|
this.dataset.testId = "interface-root";
|
|
}
|
|
}
|