Files
vito/resources/js/layouts/settings/layout.tsx
Saeed Vaziry 342a3aa4c6 Plugins (#616)
* wip

* fix plugin uninstall

* marketplace
2025-06-19 14:07:15 +02:00

82 lines
1.8 KiB
TypeScript

import { type BreadcrumbItem, type NavItem } from '@/types';
import { BellIcon, CloudIcon, CodeIcon, CommandIcon, DatabaseIcon, KeyIcon, ListIcon, PlugIcon, TagIcon, UserIcon, UsersIcon } from 'lucide-react';
import { ReactNode } from 'react';
import Layout from '@/layouts/app/layout';
import VitoIcon from '@/icons/vito';
const sidebarNavItems: NavItem[] = [
{
title: 'Profile',
href: route('profile'),
icon: UserIcon,
},
{
title: 'Users',
href: route('users'),
icon: UsersIcon,
},
{
title: 'Projects',
href: route('projects'),
icon: ListIcon,
},
{
title: 'Server Providers',
href: route('server-providers'),
icon: CloudIcon,
},
{
title: 'Source Controls',
href: route('source-controls'),
icon: CodeIcon,
},
{
title: 'Storage Providers',
href: route('storage-providers'),
icon: DatabaseIcon,
},
{
title: 'Notification Channels',
href: route('notification-channels'),
icon: BellIcon,
},
{
title: 'SSH Keys',
href: route('ssh-keys'),
icon: KeyIcon,
},
{
title: 'Tags',
href: route('tags'),
icon: TagIcon,
},
{
title: 'API Keys',
href: route('api-keys'),
icon: CommandIcon,
},
{
title: 'Plugins',
href: route('plugins'),
icon: PlugIcon,
},
{
title: 'Vito Settings',
href: route('vito-settings'),
icon: VitoIcon,
},
];
export default function SettingsLayout({ children, breadcrumbs }: { children: ReactNode; breadcrumbs?: BreadcrumbItem[] }) {
// When server-side rendering, we only render the layout on the client...
if (typeof window === 'undefined') {
return null;
}
return (
<Layout breadcrumbs={breadcrumbs} secondNavItems={sidebarNavItems} secondNavTitle="Settings">
{children}
</Layout>
);
}