4f6c5995f8
New /library: GET /api/library lists LibraryItems enriched with rgMbid + year from the matching MonitoredRelease. Client renders a cover-art grid with a live filter; clicking an album opens the AlbumModal (tracklist). Added Library to the nav. The album-only overview to see everything downloaded. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
30 lines
828 B
TypeScript
30 lines
828 B
TypeScript
"use client";
|
|
|
|
import { usePathname } from "next/navigation";
|
|
|
|
const LINKS: { href: string; label: string }[] = [
|
|
{ href: "/", label: "The Floor" },
|
|
{ href: "/library", label: "Library" },
|
|
{ href: "/artists", label: "Artists" },
|
|
{ href: "/discover", label: "Discover" },
|
|
{ href: "/wanted", label: "Wanted" },
|
|
];
|
|
|
|
export function ContentsNav() {
|
|
const pathname = usePathname();
|
|
const active = (href: string) => (href === "/" ? pathname === "/" : pathname.startsWith(href));
|
|
return (
|
|
<nav className="contents">
|
|
{LINKS.map((l) => (
|
|
<a key={l.href} href={l.href} className={active(l.href) ? "here" : ""}>
|
|
{l.label}
|
|
</a>
|
|
))}
|
|
<span className="sep" />
|
|
<a href="/settings" className={active("/settings") ? "here" : ""}>
|
|
Settings
|
|
</a>
|
|
</nav>
|
|
);
|
|
}
|