web/admin: improve UI for notification toggle

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-07-22 14:15:54 +02:00
parent cbeb6e58ac
commit ff64814f40
9 changed files with 55 additions and 49 deletions

View File

@ -33,7 +33,7 @@ export class MessageContainer extends LitElement {
constructor() {
super();
this.addEventListener(EVENT_WS_MESSAGE, ((e: CustomEvent<WSMessage>) => {
if (e.detail.type !== WS_MSG_TYPE_MESSAGE) return;
if (e.detail.message_type !== WS_MSG_TYPE_MESSAGE) return;
this.addMessage(e.detail as unknown as APIMessage);
}) as EventListener);
}