- Product aanmaken/bewerken/archiveren/herstellen (ST-101, ST-103) - SplitPane component met versleepbare splitter en localStorage (ST-104) - PanelNavBar herbruikbaar paneelheader component (ST-105) - PbiList met prioriteitsgroepen, inline aanmaken, filter en verwijderen (ST-106-ST-110) - StoryPanel placeholder rechter paneel met selectie via Zustand (ST-109) - App iconen geinstalleerd: favicon, apple-icon, PWA manifest (192/512px) - AppIcon SVG component in navigatiebar - Root layout metadata bijgewerkt naar Nederlands Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
75 lines
2.4 KiB
TypeScript
75 lines
2.4 KiB
TypeScript
'use client'
|
|
|
|
import Link from 'next/link'
|
|
import { usePathname } from 'next/navigation'
|
|
import { logoutAction } from '@/actions/auth'
|
|
import { Button } from '@/components/ui/button'
|
|
import { Badge } from '@/components/ui/badge'
|
|
import { AppIcon } from '@/components/shared/app-icon'
|
|
import { cn } from '@/lib/utils'
|
|
|
|
interface NavBarProps {
|
|
isDemo: boolean
|
|
}
|
|
|
|
export function NavBar({ isDemo }: NavBarProps) {
|
|
const pathname = usePathname()
|
|
|
|
const navLinks = [
|
|
{ href: '/dashboard', label: 'Producten' },
|
|
{ href: '/todos', label: "Todo's" },
|
|
]
|
|
|
|
return (
|
|
<header className="bg-surface-container-low border-b border-border h-14 flex items-center px-4 gap-4 shrink-0">
|
|
{/* Logo */}
|
|
<Link href="/dashboard" className="flex items-center gap-2 font-medium text-foreground">
|
|
<AppIcon size={24} />
|
|
<span className="text-primary font-semibold">Scrum4Me</span>
|
|
{isDemo && (
|
|
<Badge className="bg-warning text-warning-foreground text-xs px-2 py-0">
|
|
Demo
|
|
</Badge>
|
|
)}
|
|
</Link>
|
|
|
|
{/* Nav links */}
|
|
<nav className="flex items-center gap-1 ml-2">
|
|
{navLinks.map(link => (
|
|
<Link
|
|
key={link.href}
|
|
href={link.href}
|
|
className={cn(
|
|
'px-3 py-1.5 rounded-md text-sm transition-colors',
|
|
pathname.startsWith(link.href)
|
|
? 'bg-primary-container text-primary-container-foreground font-medium'
|
|
: 'text-muted-foreground hover:text-foreground hover:bg-surface-container'
|
|
)}
|
|
>
|
|
{link.label}
|
|
</Link>
|
|
))}
|
|
</nav>
|
|
|
|
{/* Rechts: instellingen + uitloggen */}
|
|
<div className="ml-auto flex items-center gap-2">
|
|
<Link
|
|
href="/settings"
|
|
className={cn(
|
|
'px-3 py-1.5 rounded-md text-sm transition-colors',
|
|
pathname.startsWith('/settings')
|
|
? 'bg-primary-container text-primary-container-foreground font-medium'
|
|
: 'text-muted-foreground hover:text-foreground hover:bg-surface-container'
|
|
)}
|
|
>
|
|
Instellingen
|
|
</Link>
|
|
<form action={logoutAction}>
|
|
<Button variant="ghost" size="sm" type="submit" className="text-muted-foreground hover:text-foreground">
|
|
Uitloggen
|
|
</Button>
|
|
</form>
|
|
</div>
|
|
</header>
|
|
)
|
|
}
|