finally synced
This commit is contained in:
@@ -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,8 +454,10 @@
|
|||||||
{/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.
|
||||||
|
Hidden on lg+ via CSS. -->
|
||||||
|
<Portal>
|
||||||
<div
|
<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"
|
||||||
>
|
>
|
||||||
@@ -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>
|
||||||
@@ -694,6 +699,8 @@
|
|||||||
</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"
|
||||||
|
|||||||
@@ -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. -->
|
||||||
|
|||||||
Reference in New Issue
Block a user