Update routing and sidebar links to remove '/central' prefix
This commit is contained in:
@@ -55,23 +55,23 @@ export function AppSidebar() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const domainsItems = [
|
const domainsItems = [
|
||||||
{ to: '/central', icon: LayoutDashboard, label: 'Dashboard', end: true },
|
{ to: '/', icon: LayoutDashboard, label: 'Dashboard', end: true },
|
||||||
{ to: '/central/domains', icon: Globe, label: 'Domains' },
|
{ to: '/domains', icon: Globe, label: 'Domains' },
|
||||||
];
|
];
|
||||||
|
|
||||||
const centralItems = [
|
const centralItems = [
|
||||||
{ to: '/central/vpn', icon: Lock, label: 'VPN', daemon: 'wireguard' as const },
|
{ to: '/vpn', icon: Lock, label: 'VPN', daemon: 'wireguard' as const },
|
||||||
{ to: '/central/firewall', icon: Shield, label: 'Firewall', daemon: 'nftables' as const },
|
{ to: '/firewall', icon: Shield, label: 'Firewall', daemon: 'nftables' as const },
|
||||||
{ to: '/central/crowdsec', icon: ShieldAlert, label: 'CrowdSec', daemon: 'crowdsec' as const },
|
{ to: '/crowdsec', icon: ShieldAlert, label: 'CrowdSec', daemon: 'crowdsec' as const },
|
||||||
{ to: '/central/dhcp', icon: Wifi, label: 'DHCP', daemon: 'dnsmasq' as const },
|
{ to: '/dhcp', icon: Wifi, label: 'DHCP', daemon: 'dnsmasq' as const },
|
||||||
];
|
];
|
||||||
|
|
||||||
const advancedItems = [
|
const advancedItems = [
|
||||||
{ to: '/central/advanced/haproxy', icon: Network, label: 'HAProxy', daemon: 'haproxy' as const },
|
{ to: '/advanced/haproxy', icon: Network, label: 'HAProxy', daemon: 'haproxy' as const },
|
||||||
{ to: '/central/advanced/dnsmasq', icon: Wifi, label: 'dnsmasq', daemon: 'dnsmasq' as const },
|
{ to: '/advanced/dnsmasq', icon: Wifi, label: 'dnsmasq', daemon: 'dnsmasq' as const },
|
||||||
{ to: '/central/advanced/nftables', icon: Shield, label: 'nftables', daemon: 'nftables' as const },
|
{ to: '/advanced/nftables', icon: Shield, label: 'nftables', daemon: 'nftables' as const },
|
||||||
{ to: '/central/advanced/wireguard', icon: Lock, label: 'WireGuard', daemon: 'wireguard' as const },
|
{ to: '/advanced/wireguard', icon: Lock, label: 'WireGuard', daemon: 'wireguard' as const },
|
||||||
{ to: '/central/advanced/crowdsec', icon: ShieldAlert, label: 'CrowdSec', daemon: 'crowdsec' as const },
|
{ to: '/advanced/crowdsec', icon: ShieldAlert, label: 'CrowdSec', daemon: 'crowdsec' as const },
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { Navigate } from 'react-router';
|
|
||||||
import type { RouteObject } from 'react-router';
|
import type { RouteObject } from 'react-router';
|
||||||
import { CentralLayout } from './CentralLayout';
|
import { CentralLayout } from './CentralLayout';
|
||||||
import { NotFoundPage } from './pages/NotFoundPage';
|
import { NotFoundPage } from './pages/NotFoundPage';
|
||||||
@@ -16,10 +15,6 @@ import {
|
|||||||
export const routes: RouteObject[] = [
|
export const routes: RouteObject[] = [
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
element: <Navigate to="/central" replace />,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/central',
|
|
||||||
element: <CentralLayout />,
|
element: <CentralLayout />,
|
||||||
children: [
|
children: [
|
||||||
{ index: true, element: <DashboardPage /> },
|
{ index: true, element: <DashboardPage /> },
|
||||||
|
|||||||
Reference in New Issue
Block a user