Refactors and adds new mode concept

This commit is contained in:
Rune Harlyk
2024-02-24 01:50:05 +01:00
committed by Rune Harlyk
parent e6296555da
commit 0f676e3543
20 changed files with 244 additions and 177 deletions
+3 -1
View File
@@ -39,7 +39,9 @@ class SocketService {
}
public addPublisher(store: Writable<WebsocketOutData>, type?: string) {
store.subscribe((data) => this.send(type ? JSON.stringify({ type, data }) : data));
const publish = (data: WebsocketOutData) =>
this.send(type ? JSON.stringify({ type, data }) : data);
store.subscribe(publish);
}
private handleConnected(): void {