Rework navigation for a consistent music/room toggle and back button
- Replace the "Mein Zimmer"/"Musik" text pills and the help button with
two fixed circular corner buttons: a music/room toggle (top-right)
and a single "back one level" button (top-left) used everywhere -
search, categories, and the play view.
- Split `view` (browse/play) from a new `page` (music/room) in UiState
so toggling to the room and back leaves the music side - search,
selection, even the full-screen play view - exactly as it was.
- Back peels one step at a time (search, then track-search mode, then
group+category together, since a root shelf tile sets both at once
and undoing that jump should be one step too).
- Album cards: click the cover to open the track list, click the title
to start playing immediately (matching what Enter already did from
the keyboard). Audiobook cards drop the artist line and clamp the
title to a fixed height so covers stay aligned across a row.
- Root shelf group headings ("Musik", "Hörbücher", "Podcasts") are now
the link into that group's full category grid, replacing the
separate search-icon button.
- "Taste zuweisen" is now an icon-only round button, moved to the
bottom-right so it doesn't sit under the new toggle.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,17 +5,9 @@ interface Props {
|
||||
mascot?: string;
|
||||
/** Shown next to the title when the mouse is reachable but the firmware is not. */
|
||||
status?: ReactNode;
|
||||
/** A pill linking to the other page - there's no router, so it's a click handler
|
||||
* rather than an `href`. */
|
||||
link?: { label: string; onClick: () => void };
|
||||
}
|
||||
|
||||
export function AppHeader({
|
||||
title = "Musik Delphin",
|
||||
mascot = "/dolphin-mascot.png",
|
||||
status,
|
||||
link,
|
||||
}: Props) {
|
||||
export function AppHeader({ title = "Musik Delphin", mascot = "/dolphin-mascot.png", status }: Props) {
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
@@ -29,26 +21,6 @@ export function AppHeader({
|
||||
position: "relative",
|
||||
}}
|
||||
>
|
||||
{link && (
|
||||
<button
|
||||
onClick={link.onClick}
|
||||
style={{
|
||||
position: "absolute",
|
||||
left: 24,
|
||||
border: "none",
|
||||
cursor: "pointer",
|
||||
background: "oklch(97% 0.01 230 / .95)",
|
||||
color: "oklch(30% 0.03 230)",
|
||||
fontWeight: 800,
|
||||
fontSize: 14,
|
||||
padding: "9px 16px",
|
||||
borderRadius: 999,
|
||||
boxShadow: "0 6px 18px oklch(15% 0.04 230 / .4)",
|
||||
}}
|
||||
>
|
||||
{link.label}
|
||||
</button>
|
||||
)}
|
||||
<img src={mascot} alt="" style={{ width: 64, height: 64, objectFit: "contain" }} />
|
||||
<div
|
||||
style={{
|
||||
|
||||
Reference in New Issue
Block a user