web: decrease elements that refresh on global refresh signal

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-05-23 20:26:33 +02:00
parent 4704de937a
commit cbd95848e7
2 changed files with 4 additions and 4 deletions

View File

@ -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();
});
}

View File

@ -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));