Files
Kaname/src/components/app-nav.tsx
T
Pascal LinxweilerandClaude Opus 5.5 3603742637 Flag models deleted from the Hub; tag picker, tags in settings, account menu
- Worker checks each model's repo and pinned commit on the Hub every
  UPDATE_CHECK_INTERVAL_HOURS and after failed downloads; missing repos or
  commits are flagged (badge, banner, Status filter) and block new
  downloads. Local files are never touched. "Check now" on the model page.
- Tag picker dropdown ("Create new tag…" first, then existing tags) on the
  model page and in Add model.
- Settings: separate File labels and Tags pages; create tags there. Unused
  tags are no longer deleted automatically.
- Header: app icon, nav with active state, account menu with the OIDC
  profile picture, theme switch and sign out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 22:53:57 +02:00

38 lines
1.3 KiB
TypeScript

"use client";
import { LibraryIcon, SettingsIcon } from "lucide-react";
import Link from "next/link";
import { usePathname } from "next/navigation";
import { cn } from "@/lib/utils";
const LINKS = [
{ href: "/", label: "Library", icon: LibraryIcon, active: (p: string) => !p.startsWith("/settings") && !p.startsWith("/jobs/") },
{ href: "/settings", label: "Settings", icon: SettingsIcon, active: (p: string) => p.startsWith("/settings") },
];
/** Main navigation; model and job pages count as part of the library. */
export function AppNav() {
const pathname = usePathname();
return (
<nav className="flex items-center gap-1 text-sm">
{LINKS.map((l) => {
const active = l.active(pathname) || (l.href === "/" && pathname.startsWith("/jobs/"));
return (
<Link
key={l.href}
href={l.href}
aria-current={active ? "page" : undefined}
className={cn(
"flex items-center gap-1.5 rounded-md px-2.5 py-1.5 transition-colors",
active ? "bg-muted font-medium text-foreground" : "text-muted-foreground hover:bg-muted/60 hover:text-foreground",
)}
>
<l.icon className="size-4" />
<span className="hidden sm:inline">{l.label}</span>
</Link>
);
})}
</nav>
);
}