feat(chrome): shared account menu and global app header

Move account actions (Settings, Downloads, Display preferences, Sign
out) out of the library-only header into a shared AccountMenu anchored in
a global AppHeader, available on every authenticated non-immersive
screen. Add a layoutShell helper deciding where chrome shows, expose
serverName/serverUrl auth stores, and a display view-mode preference. The
settings page also gains the UR-053 WiFi-only toggle.

TRACES: UR-054 | DR-075, DR-076, DR-077
This commit is contained in:
2026-07-23 20:03:12 +02:00
parent f25deba824
commit cf9472f04f
9 changed files with 643 additions and 19 deletions
+23
View File
@@ -67,6 +67,29 @@ export function routeOwnsLayout({ pathname }: { pathname: string }): boolean {
);
}
/**
* Whether the root layout should render the shared app header (logo, desktop
* nav, and the account menu) for this route.
*
* Routes that own their layout (library) render their own AppHeader, so the
* root must not double it up. `/settings` owns its content but deliberately has
* no account menu (the user is already there). `/player/*` and `/login` are
* immersive/chrome-free. Everything else authenticated (`/`, `/search`,
* `/downloads`) gets the header from the root — the whole point of UR-054.
*
* TRACES: UR-054 | DR-076
*/
export function showGlobalHeader({
pathname,
isAuthenticated,
}: BottomUiVisibilityInput): boolean {
return (
isAuthenticated &&
!routeOwnsLayout({ pathname }) &&
!pathname.startsWith("/settings")
);
}
/**
* Whether any bottom UI is showing for this route (mini player, nav, or both).
* The bottom UI is rendered in flex flow below the scroller (see BottomUi.svelte),