web: decrease elements that refresh on global refresh signal
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
4704de937a
commit
cbd95848e7
|
@ -17,8 +17,8 @@ import { me } from "../api/Users";
|
||||||
import {
|
import {
|
||||||
EVENT_API_DRAWER_TOGGLE,
|
EVENT_API_DRAWER_TOGGLE,
|
||||||
EVENT_NOTIFICATION_DRAWER_TOGGLE,
|
EVENT_NOTIFICATION_DRAWER_TOGGLE,
|
||||||
EVENT_REFRESH,
|
|
||||||
EVENT_SIDEBAR_TOGGLE,
|
EVENT_SIDEBAR_TOGGLE,
|
||||||
|
EVENT_WS_MESSAGE,
|
||||||
TITLE_DEFAULT,
|
TITLE_DEFAULT,
|
||||||
} from "../constants";
|
} from "../constants";
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ export class PageHeader extends LitElement {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
window.addEventListener(EVENT_REFRESH, () => {
|
window.addEventListener(EVENT_WS_MESSAGE, () => {
|
||||||
this.firstUpdated();
|
this.firstUpdated();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ import { WebsocketClient } from "../common/ws";
|
||||||
import {
|
import {
|
||||||
EVENT_API_DRAWER_TOGGLE,
|
EVENT_API_DRAWER_TOGGLE,
|
||||||
EVENT_NOTIFICATION_DRAWER_TOGGLE,
|
EVENT_NOTIFICATION_DRAWER_TOGGLE,
|
||||||
EVENT_REFRESH,
|
EVENT_WS_MESSAGE,
|
||||||
} from "../constants";
|
} from "../constants";
|
||||||
import "../elements/messages/MessageContainer";
|
import "../elements/messages/MessageContainer";
|
||||||
import "../elements/messages/MessageContainer";
|
import "../elements/messages/MessageContainer";
|
||||||
|
@ -115,7 +115,7 @@ export class UserInterface extends LitElement {
|
||||||
apiDrawerOpen: this.apiDrawerOpen,
|
apiDrawerOpen: this.apiDrawerOpen,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
window.addEventListener(EVENT_REFRESH, () => {
|
window.addEventListener(EVENT_WS_MESSAGE, () => {
|
||||||
this.firstUpdated();
|
this.firstUpdated();
|
||||||
});
|
});
|
||||||
tenant().then((tenant) => (this.tenant = tenant));
|
tenant().then((tenant) => (this.tenant = tenant));
|
||||||
|
|
Reference in New Issue