From cbd95848e7191bc1564058acc4e2e8e47f958696 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 23 May 2022 20:26:33 +0200 Subject: [PATCH] web: decrease elements that refresh on global refresh signal Signed-off-by: Jens Langhammer --- web/src/elements/PageHeader.ts | 4 ++-- web/src/interfaces/UserInterface.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/elements/PageHeader.ts b/web/src/elements/PageHeader.ts index 6583625c6..02411c852 100644 --- a/web/src/elements/PageHeader.ts +++ b/web/src/elements/PageHeader.ts @@ -17,8 +17,8 @@ import { me } from "../api/Users"; import { EVENT_API_DRAWER_TOGGLE, EVENT_NOTIFICATION_DRAWER_TOGGLE, - EVENT_REFRESH, EVENT_SIDEBAR_TOGGLE, + EVENT_WS_MESSAGE, TITLE_DEFAULT, } from "../constants"; @@ -97,7 +97,7 @@ export class PageHeader extends LitElement { constructor() { super(); - window.addEventListener(EVENT_REFRESH, () => { + window.addEventListener(EVENT_WS_MESSAGE, () => { this.firstUpdated(); }); } diff --git a/web/src/interfaces/UserInterface.ts b/web/src/interfaces/UserInterface.ts index 3f52530da..bd0b8d583 100644 --- a/web/src/interfaces/UserInterface.ts +++ b/web/src/interfaces/UserInterface.ts @@ -25,7 +25,7 @@ import { WebsocketClient } from "../common/ws"; import { EVENT_API_DRAWER_TOGGLE, EVENT_NOTIFICATION_DRAWER_TOGGLE, - EVENT_REFRESH, + EVENT_WS_MESSAGE, } from "../constants"; import "../elements/messages/MessageContainer"; import "../elements/messages/MessageContainer"; @@ -115,7 +115,7 @@ export class UserInterface extends LitElement { apiDrawerOpen: this.apiDrawerOpen, }); }); - window.addEventListener(EVENT_REFRESH, () => { + window.addEventListener(EVENT_WS_MESSAGE, () => { this.firstUpdated(); }); tenant().then((tenant) => (this.tenant = tenant));