finally synced

This commit is contained in:
2026-02-06 04:09:58 -08:00
parent 291b8d5d21
commit 2839417ee9
2 changed files with 238 additions and 231 deletions

View File

@@ -34,6 +34,7 @@
type PlayerSnapshot, type PlayerSnapshot,
} from "$lib/player/player.svelte"; } from "$lib/player/player.svelte";
import { createMediaSessionBindings } from "$lib/player/media-session"; import { createMediaSessionBindings } from "$lib/player/media-session";
import Portal from "$lib/components/util/Portal.svelte";
import { import {
ChevronsUpDown, ChevronsUpDown,
@@ -453,11 +454,13 @@
{/if} {/if}
</svelte:head> </svelte:head>
<!-- Mobile UI is allowed to render as an overlay even if this component is mounted <!-- Mobile UI is portaled to document.body so the GlobalPlayer can be mounted
inside the desktop sidebar column. We hide it on lg+ via CSS, not by unmounting. --> in the desktop sidebar column while still showing the mobile overlay.
<div Hidden on lg+ via CSS. -->
<Portal>
<div
class="lg:hidden fixed bottom-0 left-0 right-0 z-50 border-t bg-background/95 backdrop-blur shadow-2xl" class="lg:hidden fixed bottom-0 left-0 right-0 z-50 border-t bg-background/95 backdrop-blur shadow-2xl"
> >
<div class="mx-auto flex max-w-4xl items-center gap-2 px-3 py-2"> <div class="mx-auto flex max-w-4xl items-center gap-2 px-3 py-2">
<button <button
class="inline-flex h-8 w-8 items-center justify-center rounded border" class="inline-flex h-8 w-8 items-center justify-center rounded border"
@@ -623,7 +626,9 @@
step="0.01" step="0.01"
value={snap.volume} value={snap.volume}
oninput={(e) => oninput={(e) =>
setVolume(Number((e.currentTarget as HTMLInputElement).value))} setVolume(
Number((e.currentTarget as HTMLInputElement).value),
)}
/> />
</label> </label>
</div> </div>
@@ -693,7 +698,9 @@
</div> </div>
</div> </div>
{/if} {/if}
</div> </div>
</Portal>
<!-- Desktop UI stays in-flow in the right grid column. Hide on small screens via CSS. --> <!-- Desktop UI stays in-flow in the right grid column. Hide on small screens via CSS. -->
<aside <aside
class="hidden lg:flex sticky top-4 h-[calc(100dvh-2rem)] overflow-hidden bg-background flex-col" class="hidden lg:flex sticky top-4 h-[calc(100dvh-2rem)] overflow-hidden bg-background flex-col"

View File

@@ -31,5 +31,5 @@
</aside> </aside>
</div> </div>
<!-- Mobile player is rendered by the same GlobalPlayer instance above. <!-- Mobile player UI is rendered via a portal from the single GlobalPlayer instance
On small screens, it uses fixed positioning internally so it can overlay. --> mounted in the desktop sidebar column above. -->