diff options
| author | Maze Winther <mazewinther@gmail.com> | 2025-06-22 13:08:37 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2025-06-22 13:08:37 +0200 |
| commit | 6b77e83ca0a14111fb675338102f7b0683ea1fcb (patch) | |
| tree | 9431533ce3d92cc7b3e8c7c014923c89d29b51c5 /apps/web/src/stores/editor-store.ts | |
| parent | be970248686c0af7d8506cba8c64bf507419da3d (diff) | |
| download | opencut-6b77e83ca0a14111fb675338102f7b0683ea1fcb.tar.gz | |
rename app provider to editor provider and add it to the editor instead
Diffstat (limited to 'apps/web/src/stores/editor-store.ts')
| -rw-r--r-- | apps/web/src/stores/editor-store.ts | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/apps/web/src/stores/editor-store.ts b/apps/web/src/stores/editor-store.ts new file mode 100644 index 00000000..746fdc45 --- /dev/null +++ b/apps/web/src/stores/editor-store.ts @@ -0,0 +1,35 @@ +import { create } from "zustand";
+
+interface AppState {
+ // Loading states
+ isInitializing: boolean;
+ isPanelsReady: boolean;
+
+ // Actions
+ setInitializing: (loading: boolean) => void;
+ setPanelsReady: (ready: boolean) => void;
+ initializeApp: () => Promise<void>;
+}
+
+export const useAppStore = create<AppState>((set, get) => ({
+ // Initial states
+ isInitializing: true,
+ isPanelsReady: false,
+
+ // Actions
+ setInitializing: (loading) => {
+ set({ isInitializing: loading });
+ },
+
+ setPanelsReady: (ready) => {
+ set({ isPanelsReady: ready });
+ },
+
+ initializeApp: async () => {
+ console.log("Initializing video editor...");
+ set({ isInitializing: true, isPanelsReady: false });
+
+ set({ isPanelsReady: true, isInitializing: false });
+ console.log("Video editor ready");
+ },
+}));
|
