From 9e8f23aab72f43674bc81f5a4f7882f99494ac4c Mon Sep 17 00:00:00 2001 From: Paul Payne Date: Sat, 11 Jul 2026 23:40:34 +0000 Subject: [PATCH] Update routing and sidebar links to remove '/central' prefix --- web/src/components/AppSidebar.tsx | 22 +++++++++++----------- web/src/router/routes.tsx | 5 ----- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/web/src/components/AppSidebar.tsx b/web/src/components/AppSidebar.tsx index e5ac4e9..0398dfe 100644 --- a/web/src/components/AppSidebar.tsx +++ b/web/src/components/AppSidebar.tsx @@ -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 ( diff --git a/web/src/router/routes.tsx b/web/src/router/routes.tsx index b1b9717..edf8d12 100644 --- a/web/src/router/routes.tsx +++ b/web/src/router/routes.tsx @@ -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: , - }, - { - path: '/central', element: , children: [ { index: true, element: },