This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/web/src/elements/Base.ts

20 lines
500 B
TypeScript

import { EVENT_LOCALE_CHANGE } from "@goauthentik/common/constants";
import { LitElement } from "lit";
export class AKElement extends LitElement {
constructor() {
super();
this.addEventListener(EVENT_LOCALE_CHANGE, this._handleLocaleChange);
}
disconnectedCallback() {
super.disconnectedCallback();
this.removeEventListener(EVENT_LOCALE_CHANGE, this._handleLocaleChange);
}
private _handleLocaleChange() {
this.requestUpdate();
}
}