mirror of
https://github.com/xCyanGrizzly/DragonsStash.git
synced 2026-05-10 22:01:16 +00:00
Pattern grouping (Signal 3): - Extract YYYY-MM dates, month names, and project prefixes from filenames - Auto-group packages sharing the same pattern within a channel - Groups created with groupingSource=AUTO_PATTERN Creator grouping (Signal 4): - Auto-group 3+ ungrouped packages from the same creator within a channel - Runs after pattern grouping as lowest-priority automatic signal Notification UI: - Add NotificationBell component to header with unread badge - Popover panel shows recent notifications with severity icons - Mark individual or all notifications as read - Polls every 30 seconds for updates Failure notifications: - Upload/download failures now create SystemNotification records - Visible in the notification bell alongside hash mismatch alerts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
49 lines
1.5 KiB
TypeScript
49 lines
1.5 KiB
TypeScript
"use client";
|
|
|
|
import { usePathname } from "next/navigation";
|
|
import { Menu } from "lucide-react";
|
|
import { Button } from "@/components/ui/button";
|
|
import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet";
|
|
import { UserMenu } from "./user-menu";
|
|
import { MobileSidebar } from "./mobile-sidebar";
|
|
import { NotificationBell } from "./notification-bell";
|
|
|
|
const routeTitles: Record<string, string> = {
|
|
"/dashboard": "Dashboard",
|
|
"/filaments": "Filaments",
|
|
"/resins": "Resins",
|
|
"/paints": "Paints",
|
|
"/vendors": "Vendors",
|
|
"/locations": "Locations",
|
|
"/settings": "Settings",
|
|
};
|
|
|
|
export function Header() {
|
|
const pathname = usePathname();
|
|
const title = routeTitles[pathname] || "Dragon's Stash";
|
|
|
|
return (
|
|
<header className="sticky top-0 z-30 flex h-14 items-center gap-4 border-b border-border bg-background/95 px-4 backdrop-blur supports-[backdrop-filter]:bg-background/60 lg:px-6">
|
|
{/* Mobile menu */}
|
|
<Sheet>
|
|
<SheetTrigger asChild>
|
|
<Button variant="ghost" size="icon" className="lg:hidden">
|
|
<Menu className="h-5 w-5" />
|
|
<span className="sr-only">Toggle menu</span>
|
|
</Button>
|
|
</SheetTrigger>
|
|
<SheetContent side="left" className="w-60 p-0">
|
|
<MobileSidebar />
|
|
</SheetContent>
|
|
</Sheet>
|
|
|
|
<h1 className="text-lg font-semibold">{title}</h1>
|
|
|
|
<div className="ml-auto flex items-center gap-1">
|
|
<NotificationBell />
|
|
<UserMenu />
|
|
</div>
|
|
</header>
|
|
);
|
|
}
|