From 835545e0613f223d2cb9e9d74d47cf1030ab289a Mon Sep 17 00:00:00 2001 From: ZGaetano Date: Fri, 22 May 2026 10:05:57 -0400 Subject: [PATCH] feat(ui): wire library, jobs, ingest, editor screens to live API data: screens-editor.jsx --- services/web-ui/public/screens-editor.jsx | 118 ++++++---------------- 1 file changed, 32 insertions(+), 86 deletions(-) diff --git a/services/web-ui/public/screens-editor.jsx b/services/web-ui/public/screens-editor.jsx index 78fd840..a360b53 100644 --- a/services/web-ui/public/screens-editor.jsx +++ b/services/web-ui/public/screens-editor.jsx @@ -1,9 +1,9 @@ -// screens-editor.jsx — Editor (timeline) stub -const { ASSETS } = window.ZAMPP_DATA; +// screens-editor.jsx — Editor (timeline) function Editor() { + const { ASSETS } = window.ZAMPP_DATA; const [playing, setPlaying] = React.useState(false); - const [currentMs, setCurrentMs] = React.useState(8200); + const [currentMs, setCurrentMs] = React.useState(0); React.useEffect(() => { if (!playing) return; @@ -14,27 +14,27 @@ function Editor() { return (
- Untitled sequence - Protour 2026 · auto-saved 1m ago + New sequence
- - +
- + {!playing && ( )} -
00:00:08:06
+
{msToTimecode ? msToTimecode(currentMs) : '00:00:00:00'}
- + @@ -63,8 +63,8 @@ function Editor() {
- +
); } @@ -90,95 +90,41 @@ function Editor() { function InspGroup({ title, children }) { return (
-
{title}
-
{children}
+
{title}
+
{children}
); } function InspRow({ label, value }) { return ( -
- {label} - {value} +
+ {label} + {value}
); } -function EditorTimeline({ currentMs }) { - const v1Clips = [ - { id: "v1a", start: 0, len: 12, color: "#5B7CFA", label: "Stage_Cam_A" }, - { id: "v1b", start: 12, len: 8, color: "#5B7CFA", label: "Drone_Aerial" }, - { id: "v1c", start: 20, len: 18, color: "#5B7CFA", label: "Wide_Cam_B" }, - { id: "v1d", start: 38, len: 10, color: "#5B7CFA", label: "Trophy" }, - ]; - const v2Clips = [ - { id: "v2a", start: 6, len: 4, color: "#B57CFA", label: "Lower3rd" }, - { id: "v2b", start: 32, len: 4, color: "#B57CFA", label: "Sponsor" }, - ]; - const a1Clips = [ - { id: "a1a", start: 0, len: 48, color: "#2DD4A8", label: "FOH Mix", audio: true }, - ]; - const a2Clips = [ - { id: "a2a", start: 12, len: 6, color: "#F5A623", label: "VO", audio: true }, - ]; - const total = 60; - const playheadPct = ((currentMs / 1000) / total) * 100; - +function EditorTimeline({ currentMs, total = 60, clips = [] }) { + const playheadPct = total > 0 ? ((currentMs / 1000) / total) * 100 : 0; return (
- Timeline · 1m total + Timeline -
- - -
{Array.from({ length: 13 }).map((_, i) => (
- {i % 2 === 0 && {`00:${String(i * 5).padStart(2, "0")}`}} + {i % 2 === 0 && {`00:${String(i * 5).padStart(2, '0')}`}}
))}
- - - - + {clips.length === 0 && ( +
Drop assets from the bin to build a sequence.
+ )}
); } -function TimelineTrack({ label, clips, total, hasFilm, audio }) { - return ( -
-
{label}
-
- {clips.map(c => { - const left = (c.start / total) * 100; - const width = (c.len / total) * 100; - return ( -
-
{c.label}
- {hasFilm && ( -
- {Array.from({ length: 8 }).map((_, i) => ( -
- ))} -
- )} - {audio && ( -
- -
- )} -
- ); - })} -
-
- ); -} - window.Editor = Editor;