From 0acead5bb19e57088b1dc664b3cbbafca10d3988 Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Thu, 10 Jul 2025 21:24:47 +0200 Subject: [PATCH] refactor: move properties to dedicated folder --- .../components/editor/properties-panel.tsx | 115 ------------------ .../properties-panel/audio-properties.tsx | 5 + .../editor/properties-panel/index.tsx | 77 ++++++++++++ .../properties-panel/media-properties.tsx | 5 + .../properties-panel/text-properties.tsx | 55 +++++++++ 5 files changed, 142 insertions(+), 115 deletions(-) delete mode 100644 apps/web/src/components/editor/properties-panel.tsx create mode 100644 apps/web/src/components/editor/properties-panel/audio-properties.tsx create mode 100644 apps/web/src/components/editor/properties-panel/index.tsx create mode 100644 apps/web/src/components/editor/properties-panel/media-properties.tsx create mode 100644 apps/web/src/components/editor/properties-panel/text-properties.tsx diff --git a/apps/web/src/components/editor/properties-panel.tsx b/apps/web/src/components/editor/properties-panel.tsx deleted file mode 100644 index a0532ab..0000000 --- a/apps/web/src/components/editor/properties-panel.tsx +++ /dev/null @@ -1,115 +0,0 @@ -"use client"; - -import { useProjectStore } from "@/stores/project-store"; -import { useAspectRatio } from "@/hooks/use-aspect-ratio"; -import { Label } from "../ui/label"; -import { ScrollArea } from "../ui/scroll-area"; -import { useTimelineStore } from "@/stores/timeline-store"; -import { Textarea } from "../ui/textarea"; -import { MediaElement, TextElement } from "@/types/timeline"; -import { useMediaStore } from "@/stores/media-store"; -import { - Select, - SelectContent, - SelectTrigger, - SelectValue, - SelectItem, -} from "../ui/select"; -import { FONT_OPTIONS, type FontFamily } from "@/constants/font-constants"; - -export function PropertiesPanel() { - const { activeProject } = useProjectStore(); - const { getDisplayName, canvasSize } = useAspectRatio(); - const { selectedElements, tracks, updateTextElement } = useTimelineStore(); - const { mediaItems } = useMediaStore(); - - const emptyView = ( -
- {/* Media Properties */} -
- - - - -
-
- ); - - const TextProperties = (element: TextElement, trackId: string) => ( -
-