feat: Add new admin page titles and update header component

This commit is contained in:
wood chen 2025-02-22 00:59:36 +08:00
parent aed648fed5
commit 4a98942064

View File

@ -2,7 +2,7 @@
import { usePathname } from "next/navigation";
import { NavBar } from "./nav-bar";
import { Header } from "./header";
export function DashboardHeader() {
const pathname = usePathname();
@ -14,12 +14,15 @@ export function DashboardHeader() {
if (pathname === "/dashboard/settings") return "账号设置";
if (pathname === "/admin/users") return "用户列表";
if (pathname === "/admin/logs") return "系统日志";
if (pathname === "/admin") return "管理后台";
if (pathname === "/admin/clients") return "应用管理";
if (pathname === "/admin/authorizations") return "授权管理";
return "";
};
return (
<div className="flex flex-col">
<NavBar />
<Header />
<div className="border-b">
<div className="mx-auto flex h-16 max-w-7xl items-center px-4 sm:px-6 lg:px-8">
<h1 className="text-2xl font-bold">{getTitle()}</h1>