20 lines
500 B
TypeScript
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();
|
||
|
}
|
||
|
}
|