feat(admin): add initial admin dashboard structure

This commit introduces the foundational structure for the new admin dashboard.

- Utilizes @nuxt/ui to build the dashboard layout, including a collapsible sidebar and navigation.
- Adds initial pages for the dashboard, news, events, and hall of fame management.
- Implements a composable `useDashboardSidebarLinks` for managing sidebar navigation.
- Refactors the default layout by integrating the header and footer directly.
- Swaps the primary and secondary theme colors across the application.
This commit is contained in:
xiaomai
2025-10-08 08:49:08 +08:00
parent b05faddfc0
commit 6f181d3f22
19 changed files with 371 additions and 85 deletions

View File

@@ -0,0 +1,56 @@
import type { NavigationMenuItem } from "@nuxt/ui";
export const useDashboardSidebarLinks = () => {
const sidebarLinks = [
[
{
label: "回到主站",
icon: "mdi:home",
type: "link",
to: "/",
target: "_blank"
},
{
label: "仪表盘",
icon: "mdi:view-dashboard",
to: "/admin/dashboard",
},
{
label: "内容管理",
icon: "mdi:bookshelf",
defaultOpen: true,
type: "trigger",
children: [
{
label: "新闻",
icon: "mdi:newspaper",
to: "/admin/contents/news",
},
{
label: "活动",
icon: "mdi:event",
to: "/admin/contents/events",
},
{
label: "名人堂",
icon: "mdi:trophy-award",
to: "/admin/contents/hall-of-fames",
},
],
},
// {
// label: "Settings",
// to: "/settings",
// icon: "mdi:cog",
// defaultOpen: true,
// type: "trigger",
// children: [
// { label: "General", icon: "mdi:tune", to: "/settings", exact: true },
// { label: "Advanced", icon: "mdi:flask", to: "/settings/advanced" },
// ],
// },
],
] satisfies NavigationMenuItem[][];
return { sidebarLinks };
};