Files
yphsalumni.org/app/composables/useDashboardSidebarLinks.ts
xiaomai 1fedf7094c refactor(admin): simplify entry route to point to dashboard
The `/admin` route now directly serves the dashboard page by adding an alias, removing the need for a separate login page at that path.

- Deletes `pages/admin/index.vue` and the `admin-login` layout.
- Aliases `/admin` to `/admin/dashboard` for a more direct entry point.
- Improves the default layout with a sticky footer.
- Updates VSCode settings for better Tailwind CSS IntelliSense.
2025-10-09 09:22:21 +08:00

59 lines
1.4 KiB
TypeScript

import type { NavigationMenuItem } from "@nuxt/ui";
export const useDashboardSidebarLinks = () => {
const sidebarLinks = [
[
{
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" },
// ],
// },
],
[
{
label: "回到主站",
icon: "mdi:home",
type: "link",
to: "/",
target: "_blank",
},
],
] satisfies NavigationMenuItem[][];
return { sidebarLinks };
};