web: use constants for custom event names

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-03-23 15:16:56 +01:00
parent 56344cadeb
commit 068d281b19
18 changed files with 38 additions and 19 deletions

View File

@ -24,6 +24,7 @@ import { Page } from "../../elements/Page";
import { SAMLSource, SourcesApi } from "authentik-api";
import { DEFAULT_CONFIG } from "../../api/Config";
import { AdminURLManager, AppURLManager } from "../../api/legacy";
import { EVENT_REFRESH } from "../../constants";
@customElement("ak-source-saml-view")
export class SAMLSourceViewPage extends Page {
@ -55,7 +56,7 @@ export class SAMLSourceViewPage extends Page {
constructor() {
super();
this.addEventListener("ak-refresh", () => {
this.addEventListener(EVENT_REFRESH, () => {
if (!this.source?.pk) return;
this.sourceSlug = this.source?.slug;
});