diff options
| author | 2026-01-19 14:17:32 +0800 | |
|---|---|---|
| committer | 2026-01-19 14:17:32 +0800 | |
| commit | da0d79f0db873c08fab3bc85023167e174d18b0e (patch) | |
| tree | 4a1934780d0d723ec8b834088188d4714f2cf3e7 /ui/src/stores/ui.svelte.ts | |
| parent | 887e415314014c3da7db3048fa0e724f3078c5cb (diff) | |
| download | DropOut-da0d79f0db873c08fab3bc85023167e174d18b0e.tar.gz DropOut-da0d79f0db873c08fab3bc85023167e174d18b0e.zip | |
chore(ui): refactor workspace to monorepo
Diffstat (limited to 'ui/src/stores/ui.svelte.ts')
| -rw-r--r-- | ui/src/stores/ui.svelte.ts | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/ui/src/stores/ui.svelte.ts b/ui/src/stores/ui.svelte.ts deleted file mode 100644 index e88f6b4..0000000 --- a/ui/src/stores/ui.svelte.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { type ViewType } from "../types"; - -export class UIState { - currentView: ViewType = $state("home"); - status = $state("Ready"); - showConsole = $state(false); - appVersion = $state("..."); - - private statusTimeout: ReturnType<typeof setTimeout> | null = null; - - setStatus(msg: string) { - if (this.statusTimeout) clearTimeout(this.statusTimeout); - - this.status = msg; - - if (msg !== "Ready") { - this.statusTimeout = setTimeout(() => { - this.status = "Ready"; - }, 5000); - } - } - - toggleConsole() { - this.showConsole = !this.showConsole; - } - - setView(view: ViewType) { - this.currentView = view; - } -} - -export const uiState = new UIState(); |