mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 05:56:16 +00:00
61 lines
1.4 KiB
TypeScript
61 lines
1.4 KiB
TypeScript
import { type BreadcrumbItem, type NavItem } from '@/types';
|
|
import { BellIcon, CloudIcon, CodeIcon, DatabaseIcon, KeyIcon, ListIcon, UserIcon, UsersIcon } from 'lucide-react';
|
|
import { ReactNode } from 'react';
|
|
import Layout from '@/layouts/app/layout';
|
|
|
|
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,
|
|
},
|
|
];
|
|
|
|
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>
|
|
);
|
|
}
|