diff --git a/web/src/user/index.entrypoint.ts b/web/src/user/index.entrypoint.ts index 8f036ec49005..a04f8f5ca0b5 100644 --- a/web/src/user/index.entrypoint.ts +++ b/web/src/user/index.entrypoint.ts @@ -14,6 +14,7 @@ import { DEFAULT_CONFIG } from "#common/api/config"; import { EVENT_API_DRAWER_TOGGLE, EVENT_NOTIFICATION_DRAWER_TOGGLE, + EVENT_REFRESH, EVENT_WS_MESSAGE, } from "#common/constants"; import { globalAK } from "#common/global"; @@ -209,7 +210,10 @@ class UserInterfacePresentation extends WithBrandConfig(AKElement) { /> - ${this.renderAdminInterfaceLink()} @@ -297,6 +301,7 @@ export class UserInterface extends WithBrandConfig(AuthenticatedInterface) { window.addEventListener(EVENT_NOTIFICATION_DRAWER_TOGGLE, this.toggleNotificationDrawer); window.addEventListener(EVENT_API_DRAWER_TOGGLE, this.toggleApiDrawer); window.addEventListener(EVENT_WS_MESSAGE, this.fetchConfigurationDetails); + window.addEventListener(EVENT_REFRESH, this.fetchConfigurationDetails); } disconnectedCallback() { @@ -305,6 +310,7 @@ export class UserInterface extends WithBrandConfig(AuthenticatedInterface) { window.removeEventListener(EVENT_NOTIFICATION_DRAWER_TOGGLE, this.toggleNotificationDrawer); window.removeEventListener(EVENT_API_DRAWER_TOGGLE, this.toggleApiDrawer); window.removeEventListener(EVENT_WS_MESSAGE, this.fetchConfigurationDetails); + window.removeEventListener(EVENT_REFRESH, this.fetchConfigurationDetails); WebsocketClient.close(); }