Files
yphsalumni.org/app/composables/useDashboardSidebarLinks.ts
xiaomai e7f2bc2c47 feat(admin): implement initial admin dashboard and member management
This commit introduces the foundational structure for the admin dashboard, focusing on the member management feature.
Key additions include:

- A new page at `/admin/manage/members` to display and manage members.
- An `AddModal` component with a comprehensive form for creating new members, featuring validation with Zod and input
masking.
- A reusable `PhoneInput` component with country code selection, backed by a new `useCountries` composable and a full
country dataset.
- A custom, user-friendly global error page (`error.vue`) to handle application errors gracefully.
- Updated dashboard sidebar navigation to include the new member management section.
- Added recommended VS Code extensions and settings to improve developer experience.
2025-10-22 21:40:30 +08:00

72 lines
1.7 KiB
TypeScript

import type { NavigationMenuItem } from "@nuxt/ui";
export const useDashboardSidebarLinks = () => {
const sidebarLinks = [
[
{
label: "仪表盘",
icon: "mdi:view-dashboard",
to: "/admin/dashboard",
},
{
label: "信息管理",
icon: "mdi:file-document-outline",
defaultOpen: true,
type: "trigger",
children: [
{
label: "会员籍管理",
icon: "mdi:account",
to: "/admin/manage/members",
},
],
},
{
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" },
// ],
// },
],
[
{
label: "回到主站",
icon: "mdi:home",
type: "link",
to: "/",
target: "_blank",
},
],
] satisfies NavigationMenuItem[][];
return { sidebarLinks };
};