Initial role user app

This commit is contained in:
湛兮
2026-06-02 14:46:39 +08:00
commit 003dc60111
62 changed files with 7835 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
"use client";
import Link from "next/link";
import { usePathname } from "next/navigation";
import { Bell, CalendarDays, ClipboardList, Home, UserRound } from "lucide-react";
const items = [
{ href: "/dashboard", label: "工作台", icon: Home },
{ href: "/tasks", label: "任务", icon: ClipboardList },
{ href: "/schedule", label: "排班", icon: CalendarDays },
{ href: "/announcements", label: "公告", icon: Bell },
{ href: "/me", label: "我的", icon: UserRound }
] as const;
export function BottomNav() {
const pathname = usePathname();
return (
<nav className="bottom-nav" aria-label="主要导航">
{items.map((item) => {
const Icon = item.icon;
const active = pathname === item.href || pathname.startsWith(`${item.href}/`);
return (
<Link className={`bottom-nav__item${active ? " is-active" : ""}`} href={item.href} key={item.href}>
<Icon aria-hidden size={20} strokeWidth={active ? 2.6 : 2} />
<span>{item.label}</span>
</Link>
);
})}
</nav>
);
}