2024-11-02 09:53:48 +00:00
|
|
|
"use client";
|
|
|
|
|
|
|
|
import * as React from "react";
|
|
|
|
import {
|
2024-11-02 15:41:11 +00:00
|
|
|
BicepsFlexed,
|
2024-11-02 09:53:48 +00:00
|
|
|
BookOpen,
|
|
|
|
Bot,
|
2024-11-02 15:41:11 +00:00
|
|
|
GraduationCap,
|
2024-11-02 09:53:48 +00:00
|
|
|
LifeBuoy,
|
|
|
|
Map,
|
|
|
|
Send,
|
|
|
|
Settings2,
|
2024-11-02 15:41:11 +00:00
|
|
|
SquarePen,
|
2024-11-02 09:53:48 +00:00
|
|
|
} from "lucide-react";
|
|
|
|
import { NavMain } from "@/components/nav-main";
|
|
|
|
import { NavProjects } from "@/components/nav-projects";
|
|
|
|
import { NavSecondary } from "@/components/nav-secondary";
|
|
|
|
import { NavUser } from "@/components/nav-user";
|
|
|
|
import {
|
|
|
|
Sidebar,
|
|
|
|
SidebarContent,
|
|
|
|
SidebarFooter,
|
|
|
|
SidebarHeader,
|
|
|
|
SidebarMenu,
|
|
|
|
SidebarMenuButton,
|
|
|
|
SidebarMenuItem,
|
|
|
|
} from "@/components/ui/sidebar";
|
|
|
|
|
|
|
|
const data = {
|
|
|
|
user: {
|
2024-11-02 15:41:11 +00:00
|
|
|
name: "ngc2207",
|
|
|
|
email: "cfngc3109@gmail.com",
|
|
|
|
avatar: "/litchi.svg",
|
2024-11-02 09:53:48 +00:00
|
|
|
},
|
|
|
|
navMain: [
|
|
|
|
{
|
2024-11-02 15:41:11 +00:00
|
|
|
title: "测验",
|
|
|
|
url: "/quiz",
|
|
|
|
icon: SquarePen,
|
2024-11-02 09:53:48 +00:00
|
|
|
isActive: true,
|
|
|
|
items: [
|
|
|
|
{
|
2024-11-02 15:41:11 +00:00
|
|
|
title: "提交记录",
|
2024-11-02 09:53:48 +00:00
|
|
|
url: "#",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
2024-11-02 15:41:11 +00:00
|
|
|
title: "AI助教",
|
2024-11-02 09:53:48 +00:00
|
|
|
url: "#",
|
|
|
|
icon: Bot,
|
|
|
|
items: [
|
|
|
|
{
|
2024-11-02 15:41:11 +00:00
|
|
|
title: "设置",
|
2024-11-02 09:53:48 +00:00
|
|
|
url: "#",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
2024-11-02 15:41:11 +00:00
|
|
|
title: "文档",
|
2024-11-02 09:53:48 +00:00
|
|
|
url: "#",
|
|
|
|
icon: BookOpen,
|
|
|
|
items: [
|
|
|
|
{
|
2024-11-02 15:41:11 +00:00
|
|
|
title: "简介",
|
2024-11-02 09:53:48 +00:00
|
|
|
url: "#",
|
|
|
|
},
|
|
|
|
{
|
2024-11-02 15:41:11 +00:00
|
|
|
title: "入门指南",
|
2024-11-02 09:53:48 +00:00
|
|
|
url: "#",
|
|
|
|
},
|
|
|
|
{
|
2024-11-02 15:41:11 +00:00
|
|
|
title: "教程",
|
2024-11-02 09:53:48 +00:00
|
|
|
url: "#",
|
|
|
|
},
|
|
|
|
{
|
2024-11-02 15:41:11 +00:00
|
|
|
title: "更新日志",
|
2024-11-02 09:53:48 +00:00
|
|
|
url: "#",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
2024-11-02 15:41:11 +00:00
|
|
|
title: "应用设置",
|
2024-11-02 09:53:48 +00:00
|
|
|
url: "#",
|
|
|
|
icon: Settings2,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
navSecondary: [
|
|
|
|
{
|
2024-11-02 15:41:11 +00:00
|
|
|
title: "支持",
|
2024-11-02 09:53:48 +00:00
|
|
|
url: "#",
|
|
|
|
icon: LifeBuoy,
|
|
|
|
},
|
|
|
|
{
|
2024-11-02 15:41:11 +00:00
|
|
|
title: "反馈",
|
2024-11-02 09:53:48 +00:00
|
|
|
url: "#",
|
|
|
|
icon: Send,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
projects: [
|
|
|
|
{
|
2024-11-02 15:41:11 +00:00
|
|
|
name: "校园助手",
|
2024-11-02 09:53:48 +00:00
|
|
|
url: "#",
|
2024-11-02 15:41:11 +00:00
|
|
|
icon: Map,
|
2024-11-02 09:53:48 +00:00
|
|
|
},
|
|
|
|
{
|
2024-11-02 15:41:11 +00:00
|
|
|
name: "健身俱乐部",
|
2024-11-02 09:53:48 +00:00
|
|
|
url: "#",
|
2024-11-02 15:41:11 +00:00
|
|
|
icon: BicepsFlexed,
|
2024-11-02 09:53:48 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|
|
|
|
|
|
|
|
export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
|
|
|
return (
|
|
|
|
<Sidebar variant="inset" {...props}>
|
|
|
|
<SidebarHeader>
|
|
|
|
<SidebarMenu>
|
|
|
|
<SidebarMenuItem>
|
|
|
|
<SidebarMenuButton size="lg" asChild>
|
2024-11-02 15:41:11 +00:00
|
|
|
<a href="/dashboard">
|
2024-11-02 09:53:48 +00:00
|
|
|
<div className="flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground">
|
2024-11-02 15:41:11 +00:00
|
|
|
<GraduationCap className="size-6" />
|
2024-11-02 09:53:48 +00:00
|
|
|
</div>
|
|
|
|
<div className="grid flex-1 text-left text-sm leading-tight">
|
2024-11-02 15:41:11 +00:00
|
|
|
<span className="truncate font-semibold">上海电力大学</span>
|
|
|
|
<span className="truncate text-xs">教育机构</span>
|
2024-11-02 09:53:48 +00:00
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
</SidebarMenuButton>
|
|
|
|
</SidebarMenuItem>
|
|
|
|
</SidebarMenu>
|
|
|
|
</SidebarHeader>
|
|
|
|
<SidebarContent>
|
|
|
|
<NavMain items={data.navMain} />
|
|
|
|
<NavProjects projects={data.projects} />
|
|
|
|
<NavSecondary items={data.navSecondary} className="mt-auto" />
|
|
|
|
</SidebarContent>
|
|
|
|
<SidebarFooter>
|
|
|
|
<NavUser user={data.user} />
|
|
|
|
</SidebarFooter>
|
|
|
|
</Sidebar>
|
|
|
|
);
|
|
|
|
}
|