ui: switch storage to indexeddb

This commit is contained in:
undefined committed 2024-07-03 18:10:40 +08:00
1 parent 70872fe931
commit c996bbfe6d
6 files changed
+102 -42

No files matched your search

@@ -54,6 +54,10 @@ export default class Sock {
onclose: (code: number, reason: string) => void;
onopen: (sock: ReconnectingWebSocket) => void;
on(event: 'message' | 'close' | 'open', callback: (...args: any[]) => void) {
this[`on${event}`] = callback;
}
send(data) {
this.sock.send(data);
}