From aeaff3bc88f986c1a52f8038758d421886ea3b76 Mon Sep 17 00:00:00 2001 From: yiling Date: Sat, 4 Jul 2026 12:28:08 +0800 Subject: [PATCH] feat(webui): compare fullscreen control bar follows app theme Add a themedChrome prop to VideoControlBar that keeps the normal theme-aware chrome (bg-card / foreground text) while fullscreen instead of the dark video overlay. Compare mode passes it so its fullscreen bar matches the app light/dark theme for both video- and image-active panes (ImageControlBar is already themed). The single-file player is unchanged (themedChrome defaults to false -> dark overlay). The fullscreen toggle icon still reflects the actual fullscreen state. --- .../compare/compare-control-bar.tsx | 1 + .../components/viewers/video-control-bar.tsx | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/packages/webui/components/compare/compare-control-bar.tsx b/packages/webui/components/compare/compare-control-bar.tsx index c5e2a5f9..1f5fb776 100644 --- a/packages/webui/components/compare/compare-control-bar.tsx +++ b/packages/webui/components/compare/compare-control-bar.tsx @@ -76,6 +76,7 @@ export function CompareControlBar({ state={state} zoom={activeState.zoom} isControlsVisible + themedChrome buffered={v.buffered} data={data} resolutions={v.resolutions as DisplayTranscode[]} diff --git a/packages/webui/components/viewers/video-control-bar.tsx b/packages/webui/components/viewers/video-control-bar.tsx index 7ae29892..4d99d337 100644 --- a/packages/webui/components/viewers/video-control-bar.tsx +++ b/packages/webui/components/viewers/video-control-bar.tsx @@ -67,6 +67,12 @@ export interface ControlBarProps { totalFrames: number currentFrame: number seekToFrame: (frame: number) => Promise | void + /** + * When true, keep the normal theme-aware chrome (bg-card / foreground text) + * even while fullscreen, instead of the dark video overlay style. Used by + * compare mode so its fullscreen bar follows the app light/dark theme. + */ + themedChrome?: boolean } export const VideoControlBar: React.FC = ({ @@ -90,6 +96,7 @@ export const VideoControlBar: React.FC = ({ totalFrames, currentFrame, seekToFrame, + themedChrome = false, }) => { const { videoTimeDisplayMode, setVideoTimeDisplayMode } = useUiStore() @@ -97,6 +104,10 @@ export const VideoControlBar: React.FC = ({ return null } + // Whether to render the dark video overlay chrome. Compare mode opts out + // (themedChrome) so its fullscreen bar follows the app light/dark theme. + const overlay = state.isFullScreen && !themedChrome + const previewResolutions = resolutions.filter((r) => !r.isRaw) const startTimecode = data.media?.metadata?.startTimecode @@ -112,7 +123,7 @@ export const VideoControlBar: React.FC = ({
= ({
{/* Left Side: Play, Vol, Time */} @@ -244,7 +255,7 @@ export const VideoControlBar: React.FC = ({