This commit is contained in:
ct
2025-06-13 17:11:59 +08:00
parent 248a717898
commit 61923f4e1f
17 changed files with 515 additions and 41 deletions

View File

@@ -2,11 +2,10 @@ import { NavFooter } from '@/components/nav-footer';
import { NavMain } from '@/components/nav-main';
import { NavUser } from '@/components/nav-user';
import { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuItem } from '@/components/ui/sidebar';
import { type NavItem } from '@/types';
import { SharedData, type NavItem } from '@/types';
import { Link, usePage } from '@inertiajs/react';
import { LayoutGrid, UserCog } from 'lucide-react';
import { LayoutGrid, UserCog } from 'lucide-react';
import AppLogo from './app-logo';
import { SharedData } from '@/types';
const mainNavItems: NavItem[] = [
{
@@ -22,6 +21,11 @@ const adminMainNavItems: NavItem[] = [
href: route('admin.dashboard'),
icon: UserCog,
},
{
title: 'Background Generation',
href: route('admin.background-generation'),
icon: UserCog,
},
];
const footerNavItems: NavItem[] = [
@@ -38,7 +42,6 @@ const footerNavItems: NavItem[] = [
];
export function AppSidebar() {
const { auth } = usePage<SharedData>().props;
return (
@@ -60,8 +63,6 @@ export function AppSidebar() {
{auth?.user_is_admin && <NavMain title="Admin" items={adminMainNavItems} />}
</SidebarContent>
<SidebarFooter>
<NavFooter items={footerNavItems} className="mt-auto" />
<NavUser />