Spaces:
Sleeping
Sleeping
copilot-swe-agent[bot]
ArnavSingh76533
commited on
Commit
·
a930f4f
1
Parent(s):
6fc62e6
Move progress bar below controls and improve layout spacing
Browse files- Reorder controls: buttons on top, progress bar at bottom
- Reduce padding between control elements for compact layout
- Add smaller text size for time display
Co-authored-by: ArnavSingh76533 <160649079+ArnavSingh76533@users.noreply.github.com>
- components/player/Controls.tsx +18 -17
components/player/Controls.tsx
CHANGED
|
@@ -198,20 +198,9 @@ const Controls: FC<Props> = ({
|
|
| 198 |
</div>
|
| 199 |
</InteractionHandler>
|
| 200 |
|
| 201 |
-
{/* Bottom control cluster:
|
| 202 |
<div className="bg-dark-900/40">
|
| 203 |
-
<
|
| 204 |
-
className={"bg-transparent"}
|
| 205 |
-
value={progress}
|
| 206 |
-
onChange={(value) => {
|
| 207 |
-
setProgress(value)
|
| 208 |
-
mouseMoved()
|
| 209 |
-
}}
|
| 210 |
-
max={duration}
|
| 211 |
-
setSeeking={setSeeking}
|
| 212 |
-
showValueHover={true}
|
| 213 |
-
/>
|
| 214 |
-
<div className={"flex flex-row px-1 pb-1 items-center"}>
|
| 215 |
{playlist.currentIndex > 0 && (
|
| 216 |
<ControlButton
|
| 217 |
tooltip={"Play previous"}
|
|
@@ -269,7 +258,7 @@ const Controls: FC<Props> = ({
|
|
| 269 |
/>
|
| 270 |
<ControlButton
|
| 271 |
tooltip={"Current progress"}
|
| 272 |
-
className={"ml-auto flex items-center py-
|
| 273 |
onClick={() => {
|
| 274 |
if (show) {
|
| 275 |
setShowTimePlayed(!showTimePlayed)
|
|
@@ -277,7 +266,7 @@ const Controls: FC<Props> = ({
|
|
| 277 |
}}
|
| 278 |
interaction={showControlsAction}
|
| 279 |
>
|
| 280 |
-
<span>
|
| 281 |
{(showTimePlayed
|
| 282 |
? secondsToTime(progress)
|
| 283 |
: "-" + secondsToTime(duration - progress)) +
|
|
@@ -286,7 +275,7 @@ const Controls: FC<Props> = ({
|
|
| 286 |
</span>
|
| 287 |
</ControlButton>
|
| 288 |
|
| 289 |
-
{/* PiP button
|
| 290 |
<ControlButton
|
| 291 |
tooltip={pipEnabled ? "Exit PiP" : "Enter PiP"}
|
| 292 |
onClick={async () => {
|
|
@@ -408,7 +397,7 @@ const Controls: FC<Props> = ({
|
|
| 408 |
<IconMusic />
|
| 409 |
</ControlButton>
|
| 410 |
|
| 411 |
-
{/* Fullscreen button
|
| 412 |
<ControlButton
|
| 413 |
tooltip={fullscreen ? "Leave fullscreen" : "Enter fullscreen"}
|
| 414 |
onClick={async () => {
|
|
@@ -441,6 +430,18 @@ const Controls: FC<Props> = ({
|
|
| 441 |
{fullscreen ? <IconCompress /> : <IconExpand />}
|
| 442 |
</ControlButton>
|
| 443 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 444 |
</div>
|
| 445 |
</InteractionHandler>
|
| 446 |
|
|
|
|
| 198 |
</div>
|
| 199 |
</InteractionHandler>
|
| 200 |
|
| 201 |
+
{/* Bottom control cluster: control buttons on top, progress bar below */}
|
| 202 |
<div className="bg-dark-900/40">
|
| 203 |
+
<div className={"flex flex-row px-1 py-0.5 items-center gap-0.5"}>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 204 |
{playlist.currentIndex > 0 && (
|
| 205 |
<ControlButton
|
| 206 |
tooltip={"Play previous"}
|
|
|
|
| 258 |
/>
|
| 259 |
<ControlButton
|
| 260 |
tooltip={"Current progress"}
|
| 261 |
+
className={"ml-auto flex items-center py-0.5"}
|
| 262 |
onClick={() => {
|
| 263 |
if (show) {
|
| 264 |
setShowTimePlayed(!showTimePlayed)
|
|
|
|
| 266 |
}}
|
| 267 |
interaction={showControlsAction}
|
| 268 |
>
|
| 269 |
+
<span className="text-sm">
|
| 270 |
{(showTimePlayed
|
| 271 |
? secondsToTime(progress)
|
| 272 |
: "-" + secondsToTime(duration - progress)) +
|
|
|
|
| 275 |
</span>
|
| 276 |
</ControlButton>
|
| 277 |
|
| 278 |
+
{/* PiP button */}
|
| 279 |
<ControlButton
|
| 280 |
tooltip={pipEnabled ? "Exit PiP" : "Enter PiP"}
|
| 281 |
onClick={async () => {
|
|
|
|
| 397 |
<IconMusic />
|
| 398 |
</ControlButton>
|
| 399 |
|
| 400 |
+
{/* Fullscreen button */}
|
| 401 |
<ControlButton
|
| 402 |
tooltip={fullscreen ? "Leave fullscreen" : "Enter fullscreen"}
|
| 403 |
onClick={async () => {
|
|
|
|
| 430 |
{fullscreen ? <IconCompress /> : <IconExpand />}
|
| 431 |
</ControlButton>
|
| 432 |
</div>
|
| 433 |
+
{/* Progress bar at bottom */}
|
| 434 |
+
<InputSlider
|
| 435 |
+
className={"bg-transparent pb-1"}
|
| 436 |
+
value={progress}
|
| 437 |
+
onChange={(value) => {
|
| 438 |
+
setProgress(value)
|
| 439 |
+
mouseMoved()
|
| 440 |
+
}}
|
| 441 |
+
max={duration}
|
| 442 |
+
setSeeking={setSeeking}
|
| 443 |
+
showValueHover={true}
|
| 444 |
+
/>
|
| 445 |
</div>
|
| 446 |
</InteractionHandler>
|
| 447 |
|