diff options
| author | 2026-03-30 16:49:08 +0800 | |
|---|---|---|
| committer | 2026-03-30 16:49:08 +0800 | |
| commit | 878d66f9add4e4026a26ae2fa2a1226b5259154d (patch) | |
| tree | af78680c8d4f357843ab336bdac6e56a622de3c7 /packages/ui/src/stores/ui-store.ts | |
| parent | f8b4bcb3bdc8f11323103081ef8c05b06159d684 (diff) | |
| parent | c4dc0676d794bca2613be282867d369328ebf073 (diff) | |
| download | DropOut-878d66f9add4e4026a26ae2fa2a1226b5259154d.tar.gz DropOut-878d66f9add4e4026a26ae2fa2a1226b5259154d.zip | |
Merge branch 'main' of https://github.com/HydroRoll-Team/DropOut
Diffstat (limited to 'packages/ui/src/stores/ui-store.ts')
| -rw-r--r-- | packages/ui/src/stores/ui-store.ts | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/packages/ui/src/stores/ui-store.ts b/packages/ui/src/stores/ui-store.ts deleted file mode 100644 index 89b9191..0000000 --- a/packages/ui/src/stores/ui-store.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { create } from "zustand"; - -export type ViewType = "home" | "versions" | "settings" | "guide" | "instances"; - -interface UIState { - // State - currentView: ViewType; - showConsole: boolean; - appVersion: string; - - // Actions - toggleConsole: () => void; - setView: (view: ViewType) => void; - setAppVersion: (version: string) => void; -} - -export const useUIStore = create<UIState>((set) => ({ - // Initial state - currentView: "home", - showConsole: false, - appVersion: "...", - - // Actions - toggleConsole: () => { - set((state) => ({ showConsole: !state.showConsole })); - }, - - setView: (view: ViewType) => { - set({ currentView: view }); - }, - - setAppVersion: (version: string) => { - set({ appVersion: version }); - }, -})); - -// Provide lowercase alias for compatibility with existing imports. -// Use a function wrapper to ensure the named export exists as a callable value -// at runtime (some bundlers/tree-shakers may remove simple aliases). -export function useUiStore() { - return useUIStore(); -} |