From 2839417ee98f36c46713dac4c9c4f0c48f837f53 Mon Sep 17 00:00:00 2001 From: Yuri Tatishchev Date: Fri, 6 Feb 2026 04:09:58 -0800 Subject: [PATCH] finally synced --- src/lib/components/GlobalPlayer.svelte | 465 +++++++++++++------------ src/routes/+layout.svelte | 4 +- 2 files changed, 238 insertions(+), 231 deletions(-) diff --git a/src/lib/components/GlobalPlayer.svelte b/src/lib/components/GlobalPlayer.svelte index 38f0242..613cab6 100644 --- a/src/lib/components/GlobalPlayer.svelte +++ b/src/lib/components/GlobalPlayer.svelte @@ -34,6 +34,7 @@ type PlayerSnapshot, } from "$lib/player/player.svelte"; import { createMediaSessionBindings } from "$lib/player/media-session"; + import Portal from "$lib/components/util/Portal.svelte"; import { ChevronsUpDown, @@ -453,247 +454,253 @@ {/if} - -
-
- + + +
+
+ -
{ - const t = e.target as HTMLElement | null; - // Only toggle when tapping the track info area. Avoid toggling from - // the button zones (above/below/side) by not attaching handlers to the - // whole bar. - if (t?.closest("button,input,label,a")) return; - toggleUiOpen(); - }} - onkeydown={(e) => { - if (e.key !== "Enter" && e.key !== " ") return; - const t = e.target as HTMLElement | null; - if (t?.closest("button,input,label,a")) return; - e.preventDefault(); - toggleUiOpen(); - }} - > - {#if snap.currentTrack} -
- {#if typeNumberLabel(snap.currentTrack)} - { + const t = e.target as HTMLElement | null; + // Only toggle when tapping the track info area. Avoid toggling from + // the button zones (above/below/side) by not attaching handlers to the + // whole bar. + if (t?.closest("button,input,label,a")) return; + toggleUiOpen(); + }} + onkeydown={(e) => { + if (e.key !== "Enter" && e.key !== " ") return; + const t = e.target as HTMLElement | null; + if (t?.closest("button,input,label,a")) return; + e.preventDefault(); + toggleUiOpen(); + }} + > + {#if snap.currentTrack} +
+ {#if typeNumberLabel(snap.currentTrack)} + + {typeNumberLabel(snap.currentTrack)} + + {/if} + + {( + snap.currentTrack.animeName ?? + snap.currentTrack.album ?? + "" + ).trim()} + +
+ +
+ {(snap.currentTrack.title ?? "").trim() || "Unknown title"} + + — {(snap.currentTrack.artist ?? "").trim() || "Unknown Artist"} + +
+ {:else} +
{nowPlayingLabel()}
+ {/if} + +
+ {formatTime(currentTime)} / {formatTime(duration)} +
+ + +
+ + + + + + +
+ + {#if snap.uiOpen} +
+
+
+
+ + + -
- {(snap.currentTrack.title ?? "").trim() || "Unknown title"} - - — {(snap.currentTrack.artist ?? "").trim() || "Unknown Artist"} - -
- {:else} -
{nowPlayingLabel()}
- {/if} + +
-
- {formatTime(currentTime)} / {formatTime(duration)} -
+
+
Queue ({snap.queue.length})
- -
- - - - - - -
- - {#if snap.uiOpen} -
-
-
- - - - -
- -
-
Queue ({snap.queue.length})
- - {#if snap.queue.length === 0} -

Queue is empty.

- {:else} -
    - {#each queueDisplay as item (item.track.id)} -
  • - + - -
  • - {/each} -
- {/if} + + + {/each} + + {/if} +
-
- {/if} -
+ {/if} +
+ +
- +