Layout and search fix
🏗️ Build and Test JellyTau / Run Tests (push) Failing after 2m4s
🏗️ Build and Test JellyTau / Android Compile Check (push) Has been skipped
Traceability Validation / Check Requirement Traces (push) Successful in 23s
Build & Release / Run Tests (push) Failing after 2m45s
Build & Release / Build Linux (push) Has been skipped
Build & Release / Build Android (push) Has been skipped
Build & Release / Create Release (push) Has been skipped
🏗️ Build and Test JellyTau / Run Tests (push) Failing after 2m4s
🏗️ Build and Test JellyTau / Android Compile Check (push) Has been skipped
Traceability Validation / Check Requirement Traces (push) Successful in 23s
Build & Release / Run Tests (push) Failing after 2m45s
Build & Release / Build Linux (push) Has been skipped
Build & Release / Build Android (push) Has been skipped
Build & Release / Create Release (push) Has been skipped
This commit is contained in:
+18
-14
@@ -20,6 +20,13 @@
|
||||
import SleepTimerModal from "$lib/components/player/SleepTimerModal.svelte";
|
||||
import BottomNav from "$lib/components/BottomNav.svelte";
|
||||
import { isInitialized, pendingSyncCount, isAndroid, showSleepTimerModal, bottomUiHeight } from "$lib/stores/appState";
|
||||
import {
|
||||
showBottomNav as computeShowBottomNav,
|
||||
showGlobalMiniPlayer as computeShowGlobalMiniPlayer,
|
||||
routeOwnsLayout as computeRouteOwnsLayout,
|
||||
showBottomUi as computeShowBottomUi,
|
||||
reservedBottomPadding,
|
||||
} from "$lib/utils/layoutShell";
|
||||
// Shuffle/repeat/next/previous come from the event-driven queue store, the
|
||||
// single source of truth (updated instantly on queue_changed).
|
||||
import { isShuffle as shuffle, repeatMode as repeat, hasNext, hasPrevious } from "$lib/stores/queue";
|
||||
@@ -34,16 +41,16 @@
|
||||
// Route-level visibility for the fixed bottom UI (the mini player itself also
|
||||
// self-gates on playback state; when it renders nothing the in-flow slot
|
||||
// collapses to 0 and the ResizeObserver shrinks the reserved padding).
|
||||
// All layout-shell visibility/reservation rules live in one pure, unit-tested
|
||||
// module ($lib/utils/layoutShell) so they can't drift per route/platform.
|
||||
// The root owns the single fixed bottom UI (mini player + nav) on every route;
|
||||
// the library route used to render its own in-flow mini player, which double-
|
||||
// stacked with this fixed one and hid the last row behind the nav.
|
||||
const pathname = $derived($page.url.pathname);
|
||||
const showBottomNav = $derived(
|
||||
$isAuthenticated && !pathname.startsWith('/player/') && !pathname.startsWith('/login')
|
||||
);
|
||||
const showGlobalMiniPlayer = $derived(
|
||||
!pathname.startsWith('/player/') &&
|
||||
!pathname.startsWith('/login') &&
|
||||
!pathname.startsWith('/settings') &&
|
||||
($isAndroid || !pathname.startsWith('/library'))
|
||||
computeShowBottomNav({ pathname, isAuthenticated: $isAuthenticated })
|
||||
);
|
||||
const showGlobalMiniPlayer = $derived(computeShowGlobalMiniPlayer({ pathname }));
|
||||
|
||||
// The library and settings routes own their own full-height layout (their own
|
||||
// scroll container + bottom-space reservation), so the root must leave their
|
||||
@@ -51,13 +58,10 @@
|
||||
// downloads, sessions, home) renders straight into the root, so the root
|
||||
// wrapper has to scroll AND reserve the fixed bottom UI's height — otherwise
|
||||
// the mini player / bottom nav overlay the last rows of content.
|
||||
const routeOwnsLayout = $derived(
|
||||
pathname.startsWith('/library') ||
|
||||
pathname.startsWith('/settings') ||
|
||||
pathname.startsWith('/player/') ||
|
||||
pathname.startsWith('/login')
|
||||
const routeOwnsLayout = $derived(computeRouteOwnsLayout({ pathname }));
|
||||
const showBottomUi = $derived(
|
||||
computeShowBottomUi({ pathname, isAuthenticated: $isAuthenticated })
|
||||
);
|
||||
const showBottomUi = $derived(showBottomNav || showGlobalMiniPlayer);
|
||||
|
||||
$effect(() => {
|
||||
const el = bottomUiEl;
|
||||
@@ -212,7 +216,7 @@
|
||||
{:else}
|
||||
<div
|
||||
class="flex-1 overflow-y-auto min-h-0"
|
||||
style="padding-bottom: {showBottomUi ? `${$bottomUiHeight}px` : '0'}; overscroll-behavior: contain"
|
||||
style="padding-bottom: {showBottomUi ? reservedBottomPadding($bottomUiHeight) : '0'}; overscroll-behavior: contain"
|
||||
>
|
||||
{@render children()}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user