init laravel

This commit is contained in:
2026-05-15 16:33:21 +03:30
commit 553238b0fb
164 changed files with 28627 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
import { Link, usePage } from '@inertiajs/react';
import { LayoutGrid, Radio, Shield } from 'lucide-react';
import AppLogo from '@/components/app-logo';
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';
export function AppSidebar() {
const { auth } = usePage().props;
const mainNavItems: NavItem[] = [
{
title: 'Live',
href: '/',
icon: Radio,
},
{
title: 'Studio',
href: '/dashboard',
icon: LayoutGrid,
},
];
if (auth.user?.is_admin) {
mainNavItems.push({
title: 'Admin',
href: '/admin',
icon: Shield,
});
}
return (
<Sidebar collapsible="icon" variant="inset">
<SidebarHeader>
<SidebarMenu>
<SidebarMenuItem>
<SidebarMenuButton size="lg" asChild>
<Link href="/" prefetch>
<AppLogo />
</Link>
</SidebarMenuButton>
</SidebarMenuItem>
</SidebarMenu>
</SidebarHeader>
<SidebarContent>
<NavMain items={mainNavItems} />
</SidebarContent>
<SidebarFooter>
<NavUser />
</SidebarFooter>
</Sidebar>
);
}