From c0252fc9b86a071adda4df9a2deebfa3d1bf3059 Mon Sep 17 00:00:00 2001 From: Michael Freno Date: Tue, 11 Aug 2026 07:24:59 -0400 Subject: [PATCH] fix: playback controls block now wraps --- src/pages/Player/PlaybackControls.tsx | 101 ++++++++++++++------------ 1 file changed, 56 insertions(+), 45 deletions(-) diff --git a/src/pages/Player/PlaybackControls.tsx b/src/pages/Player/PlaybackControls.tsx index bb1c4fb..b8b653a 100644 --- a/src/pages/Player/PlaybackControls.tsx +++ b/src/pages/Player/PlaybackControls.tsx @@ -14,70 +14,81 @@ type PlaybackControlsProps = { onSpeedChange: (value: number) => void; }; -const BACKEND_LABELS: Record = { - mpv: "mpv", - none: "none", -}; - export function PlaybackControls(props: PlaybackControlsProps) { const { theme } = useTheme(); return ( - - [Prev] + {/* transport buttons — wrap as a unit, centered on their own line */} + + + [Prev] + + + {props.isPlaying ? "[Pause]" : "[Play]"} + + + [Next] + + {/* status group — always follows the buttons; wrap point is here */} - {props.isPlaying ? "[Pause]" : "[Play]"} - - - [Next] - - Vol {Math.round(props.volume * 100)}% ↑↓ - - - Speed - {props.speed}x - s - - {props.backendName && props.backendName !== "none" && ( - via - {BACKEND_LABELS[props.backendName]} + Speed + {props.speed}x + s - )} - {props.backendName === "none" && ( - - No audio player found - - )} - {props.hasAudioUrl === false && ( - - No audio URL + + {/* audio warnings — wrap to their own (3rd) line when the row is tight */} + {(props.backendName === "none" || props.hasAudioUrl === false) && ( + + {props.backendName === "none" && ( + + No audio player found + + )} + {props.hasAudioUrl === false && ( + + No audio URL + + )} )}