From be970248686c0af7d8506cba8c64bf507419da3d Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Sun, 22 Jun 2025 13:07:02 +0200 Subject: so much stuff??? --- apps/web/src/app/editor/page.tsx | 66 ++++++++++++++++++++++++++++++++++------ 1 file changed, 57 insertions(+), 9 deletions(-) (limited to 'apps/web/src/app/editor/page.tsx') diff --git a/apps/web/src/app/editor/page.tsx b/apps/web/src/app/editor/page.tsx index 51a448d9..f9f64ee6 100644 --- a/apps/web/src/app/editor/page.tsx +++ b/apps/web/src/app/editor/page.tsx @@ -1,36 +1,80 @@ +"use client"; + +import { useEffect } from "react"; import { ResizablePanelGroup, ResizablePanel, ResizableHandle, } from "../../components/ui/resizable"; -import { MediaPanel } from "../../components/media-panel"; -import { PropertiesPanel } from "../../components/properties-panel"; -import { Timeline } from "../../components/timeline"; -import { PreviewPanel } from "../../components/preview-panel"; +import { MediaPanel } from "../../components/editor/media-panel"; +import { PropertiesPanel } from "../../components/editor/properties-panel"; +import { Timeline } from "../../components/editor/timeline"; +import { PreviewPanel } from "../../components/editor/preview-panel"; +import { EditorHeader } from "@/components/editor-header"; +import { usePanelStore } from "@/stores/panel-store"; +import { useProjectStore } from "@/stores/project-store"; export default function Editor() { + const { + toolsPanel, + previewPanel, + propertiesPanel, + mainContent, + timeline, + setToolsPanel, + setPreviewPanel, + setPropertiesPanel, + setMainContent, + setTimeline, + } = usePanelStore(); + + const { activeProject, createNewProject } = useProjectStore(); + + // Initialize a new project if none exists + useEffect(() => { + if (!activeProject) { + createNewProject("Untitled Project"); + } + }, [activeProject, createNewProject]); + return (
+ - + {/* Main content area */} {/* Tools Panel */} - + {/* Preview Area */} - + {/* Properties Panel */} - + @@ -39,7 +83,11 @@ export default function Editor() { {/* Timeline */} - + -- cgit v1.3.1