Update routing and sidebar links to remove '/central' prefix

This commit is contained in:
2026-07-11 23:40:34 +00:00
parent ff6d6bbd0b
commit 9e8f23aab7
2 changed files with 11 additions and 16 deletions

View File

@@ -55,23 +55,23 @@ export function AppSidebar() {
};
const domainsItems = [
{ to: '/central', icon: LayoutDashboard, label: 'Dashboard', end: true },
{ to: '/central/domains', icon: Globe, label: 'Domains' },
{ to: '/', icon: LayoutDashboard, label: 'Dashboard', end: true },
{ to: '/domains', icon: Globe, label: 'Domains' },
];
const centralItems = [
{ to: '/central/vpn', icon: Lock, label: 'VPN', daemon: 'wireguard' as const },
{ to: '/central/firewall', icon: Shield, label: 'Firewall', daemon: 'nftables' as const },
{ to: '/central/crowdsec', icon: ShieldAlert, label: 'CrowdSec', daemon: 'crowdsec' as const },
{ to: '/central/dhcp', icon: Wifi, label: 'DHCP', daemon: 'dnsmasq' as const },
{ to: '/vpn', icon: Lock, label: 'VPN', daemon: 'wireguard' as const },
{ to: '/firewall', icon: Shield, label: 'Firewall', daemon: 'nftables' as const },
{ to: '/crowdsec', icon: ShieldAlert, label: 'CrowdSec', daemon: 'crowdsec' as const },
{ to: '/dhcp', icon: Wifi, label: 'DHCP', daemon: 'dnsmasq' as const },
];
const advancedItems = [
{ to: '/central/advanced/haproxy', icon: Network, label: 'HAProxy', daemon: 'haproxy' as const },
{ to: '/central/advanced/dnsmasq', icon: Wifi, label: 'dnsmasq', daemon: 'dnsmasq' as const },
{ to: '/central/advanced/nftables', icon: Shield, label: 'nftables', daemon: 'nftables' as const },
{ to: '/central/advanced/wireguard', icon: Lock, label: 'WireGuard', daemon: 'wireguard' as const },
{ to: '/central/advanced/crowdsec', icon: ShieldAlert, label: 'CrowdSec', daemon: 'crowdsec' as const },
{ to: '/advanced/haproxy', icon: Network, label: 'HAProxy', daemon: 'haproxy' as const },
{ to: '/advanced/dnsmasq', icon: Wifi, label: 'dnsmasq', daemon: 'dnsmasq' as const },
{ to: '/advanced/nftables', icon: Shield, label: 'nftables', daemon: 'nftables' as const },
{ to: '/advanced/wireguard', icon: Lock, label: 'WireGuard', daemon: 'wireguard' as const },
{ to: '/advanced/crowdsec', icon: ShieldAlert, label: 'CrowdSec', daemon: 'crowdsec' as const },
];
return (

View File

@@ -1,4 +1,3 @@
import { Navigate } from 'react-router';
import type { RouteObject } from 'react-router';
import { CentralLayout } from './CentralLayout';
import { NotFoundPage } from './pages/NotFoundPage';
@@ -16,10 +15,6 @@ import {
export const routes: RouteObject[] = [
{
path: '/',
element: <Navigate to="/central" replace />,
},
{
path: '/central',
element: <CentralLayout />,
children: [
{ index: true, element: <DashboardPage /> },