diff options
| author | Maze <167211895+mazeincoding@users.noreply.github.com> | 2026-01-31 00:20:04 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-31 00:20:04 +0100 |
| commit | 7bf0984698e43b9aa2dd879f65951318ed410390 (patch) | |
| tree | ccf2cd590a47d550152afc07129cb55c71a9ec35 /apps/web/src/components/editor/properties-panel/index.tsx | |
| parent | 0173db99448d1c4c6415dcf15272e17551b48b04 (diff) | |
| download | opencut-7bf0984698e43b9aa2dd879f65951318ed410390.tar.gz | |
codebase overhaul (#697)
Diffstat (limited to 'apps/web/src/components/editor/properties-panel/index.tsx')
| -rw-r--r-- | apps/web/src/components/editor/properties-panel/index.tsx | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/apps/web/src/components/editor/properties-panel/index.tsx b/apps/web/src/components/editor/properties-panel/index.tsx deleted file mode 100644 index 150f9512..00000000 --- a/apps/web/src/components/editor/properties-panel/index.tsx +++ /dev/null @@ -1,70 +0,0 @@ -"use client"; - -import { useMediaStore } from "@/stores/media-store"; -import { useTimelineStore } from "@/stores/timeline-store"; -import { ScrollArea } from "../../ui/scroll-area"; -import { AudioProperties } from "./audio-properties"; -import { MediaProperties } from "./media-properties"; -import { TextProperties } from "./text-properties"; -import { SquareSlashIcon } from "lucide-react"; - -export function PropertiesPanel() { - const { selectedElements, tracks } = useTimelineStore(); - const { mediaFiles } = useMediaStore(); - - return ( - <> - {selectedElements.length > 0 ? ( - <ScrollArea className="h-full bg-panel rounded-sm"> - {selectedElements.map(({ trackId, elementId }) => { - const track = tracks.find((t) => t.id === trackId); - const element = track?.elements.find((e) => e.id === elementId); - - if (element?.type === "text") { - return ( - <div key={elementId}> - <TextProperties element={element} trackId={trackId} /> - </div> - ); - } - if (element?.type === "media") { - const mediaFile = mediaFiles.find( - (file) => file.id === element.mediaId - ); - - if (mediaFile?.type === "audio") { - return <AudioProperties key={elementId} element={element} />; - } - - return ( - <div key={elementId}> - <MediaProperties element={element} /> - </div> - ); - } - return null; - })} - </ScrollArea> - ) : ( - <EmptyView /> - )} - </> - ); -} - -function EmptyView() { - return ( - <div className="bg-panel h-full p-4 flex flex-col items-center justify-center gap-3"> - <SquareSlashIcon - className="w-10 h-10 text-muted-foreground" - strokeWidth={1.5} - /> - <div className="flex flex-col gap-2 text-center"> - <p className="text-lg font-medium">It’s empty here</p> - <p className="text-sm text-muted-foreground text-balance"> - Click an element on the timeline to edit its properties - </p> - </div> - </div> - ); -} |
