diff options
| author | 2026-01-18 12:24:29 +0800 | |
|---|---|---|
| committer | 2026-01-18 12:24:29 +0800 | |
| commit | fd00ac6878b2cee9337b9e92d0c990ecdce9a346 (patch) | |
| tree | bb5540f763dc0061877c9d9ac53747d79193eecc /ui/src/stores/logs.svelte.ts | |
| parent | ad36e0ce82770f9b3509ddb1cf96bc3422969806 (diff) | |
| parent | 6d82ab2275130f3bafdb7ec664297eb700321526 (diff) | |
| download | DropOut-fd00ac6878b2cee9337b9e92d0c990ecdce9a346.tar.gz DropOut-fd00ac6878b2cee9337b9e92d0c990ecdce9a346.zip | |
Merge pull request #58 from HsiangNianian/main
Diffstat (limited to 'ui/src/stores/logs.svelte.ts')
| -rw-r--r-- | ui/src/stores/logs.svelte.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/src/stores/logs.svelte.ts b/ui/src/stores/logs.svelte.ts index 5df9abc..c9d4acc 100644 --- a/ui/src/stores/logs.svelte.ts +++ b/ui/src/stores/logs.svelte.ts @@ -39,7 +39,6 @@ export class LogsState { constructor() { this.addLog("info", "Launcher", "Logs initialized"); - this.setupListeners(); } addLog(level: LogEntry["level"], source: string, message: string) { @@ -95,7 +94,12 @@ export class LogsState { .join("\n"); } - private async setupListeners() { + private initialized = false; + + async init() { + if (this.initialized) return; + this.initialized = true; + // General Launcher Logs await listen<string>("launcher-log", (e) => { this.addLog("info", "Launcher", e.payload); |