diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-02-25 04:22:00 +0100 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-02-25 04:22:00 +0100 |
| commit | 07c22891687c6c41321d6119e7ddf3740fa72b8b (patch) | |
| tree | 96bc81d7ba40418b51cc5813e046950e5eef970e | |
| parent | 987153266ec44c201f6d328d2e18148b06318f6b (diff) | |
| download | opencut-07c22891687c6c41321d6119e7ddf3740fa72b8b.tar.gz | |
feat: add properties for video/image/sticker elements
| -rw-r--r-- | apps/web/src/components/editor/panels/properties/index.tsx | 10 | ||||
| -rw-r--r-- | apps/web/src/components/editor/panels/properties/video-properties.tsx | 16 |
2 files changed, 19 insertions, 7 deletions
diff --git a/apps/web/src/components/editor/panels/properties/index.tsx b/apps/web/src/components/editor/panels/properties/index.tsx index 790acdda..4f285f84 100644 --- a/apps/web/src/components/editor/panels/properties/index.tsx +++ b/apps/web/src/components/editor/panels/properties/index.tsx @@ -17,7 +17,7 @@ export function PropertiesPanel() { }); return ( - <div className="panel bg-background h-full rounded-sm border overflow-hidden"> + <div className="panel bg-background h-full rounded-sm border border-t-0 overflow-hidden"> {selectedElements.length > 0 ? ( <ScrollArea className="h-full scrollbar-hidden"> {elementsWithTracks.map(({ track, element }) => { @@ -31,10 +31,14 @@ export function PropertiesPanel() { if (element.type === "audio") { return <AudioProperties key={element.id} _element={element} />; } - if (element.type === "video" || element.type === "image") { + if ( + element.type === "video" || + element.type === "image" || + element.type === "sticker" + ) { return ( <div key={element.id}> - <VideoProperties _element={element} /> + <VideoProperties element={element} trackId={track.id} /> </div> ); } diff --git a/apps/web/src/components/editor/panels/properties/video-properties.tsx b/apps/web/src/components/editor/panels/properties/video-properties.tsx index bf6d92d8..3588cbb7 100644 --- a/apps/web/src/components/editor/panels/properties/video-properties.tsx +++ b/apps/web/src/components/editor/panels/properties/video-properties.tsx @@ -1,9 +1,17 @@ -import type { ImageElement, VideoElement } from "@/types/timeline"; +import type { ImageElement, StickerElement, VideoElement } from "@/types/timeline"; +import { BlendingSection, TransformSection } from "./sections"; export function VideoProperties({ - _element, + element, + trackId, }: { - _element: VideoElement | ImageElement; + element: VideoElement | ImageElement | StickerElement; + trackId: string; }) { - return <div className="space-y-4 p-5">Video properties</div>; + return ( + <div className="flex h-full flex-col"> + <TransformSection element={element} trackId={trackId} /> + <BlendingSection element={element} trackId={trackId} /> + </div> + ); } |
