From 54e990af26adb6e4ce467a0e9e511e52acc865e1 Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Sat, 9 Aug 2025 11:02:01 +0200 Subject: [PATCH] Merge pull request [#514](https://github.com/mazeincoding/AppCut/issues/514) --- apps/web/src/app/editor/[project_id]/page.tsx | 348 +++++++++++++++--- apps/web/src/components/editor-header.tsx | 2 + .../src/components/panel-preset-selector.tsx | 91 +++++ apps/web/src/stores/panel-store.ts | 212 ++++++++++- 4 files changed, 576 insertions(+), 77 deletions(-) create mode 100644 apps/web/src/components/panel-preset-selector.tsx diff --git a/apps/web/src/app/editor/[project_id]/page.tsx b/apps/web/src/app/editor/[project_id]/page.tsx index cae8e779..4d5a27fc 100644 --- a/apps/web/src/app/editor/[project_id]/page.tsx +++ b/apps/web/src/app/editor/[project_id]/page.tsx @@ -30,6 +30,8 @@ export default function Editor() { setTimeline, propertiesPanel, setPropertiesPanel, + activePreset, + resetCounter, } = usePanelStore(); const { @@ -153,72 +155,302 @@ export default function Editor() {
- - - {/* Main content area */} - - {/* Tools Panel */} - + + + + + + - - + + + + + - + - {/* Preview Area */} - - - + + + + + - + - - - - - - - - - {/* Timeline */} - + + + + + + ) : activePreset === "inspector" ? ( + - - - + setPropertiesPanel(100 - size)} + className="min-w-0 min-h-0" + > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ) : activePreset === "vertical-preview" ? ( + + setPreviewPanel(100 - size)} + className="min-w-0 min-h-0" + > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ) : ( + + + {/* Main content area */} + + {/* Tools Panel */} + + + + + + + {/* Preview Area */} + + + + + + + + + + + + + + + {/* Timeline */} + + + + + )}
diff --git a/apps/web/src/components/editor-header.tsx b/apps/web/src/components/editor-header.tsx index 0caa6c3e..6db2543b 100644 --- a/apps/web/src/components/editor-header.tsx +++ b/apps/web/src/components/editor-header.tsx @@ -30,6 +30,7 @@ import { FaDiscord } from "react-icons/fa6"; import { useTheme } from "next-themes"; import { usePlaybackStore } from "@/stores/playback-store"; import { TransitionUpIcon } from "./icons"; +import { PanelPresetSelector } from "./panel-preset-selector"; export function EditorHeader() { const { getTotalDuration } = useTimelineStore(); @@ -141,6 +142,7 @@ export function EditorHeader() { const rightContent = (