fix: Settings submenu standalone-only, dashboard path, add admin bar link
This commit is contained in:
@@ -328,7 +328,8 @@ function AppRoutes() {
|
||||
return (
|
||||
<Routes>
|
||||
{/* Dashboard */}
|
||||
<Route path="/" element={<Dashboard />} />
|
||||
<Route path="/" element={<Navigate to="/dashboard" replace />} />
|
||||
<Route path="/dashboard" element={<Dashboard />} />
|
||||
<Route path="/dashboard/revenue" element={<DashboardRevenue />} />
|
||||
<Route path="/dashboard/orders" element={<DashboardOrders />} />
|
||||
<Route path="/dashboard/products" element={<DashboardProducts />} />
|
||||
|
||||
@@ -46,10 +46,10 @@ function getStaticFallbackTree(): MainNode[] {
|
||||
{
|
||||
key: 'dashboard',
|
||||
label: 'Dashboard',
|
||||
path: '/',
|
||||
path: '/dashboard',
|
||||
icon: 'layout-dashboard',
|
||||
children: [
|
||||
{ label: 'Overview', mode: 'spa', path: '/', exact: true },
|
||||
{ label: 'Overview', mode: 'spa', path: '/dashboard', exact: true },
|
||||
{ label: 'Revenue', mode: 'spa', path: '/dashboard/revenue' },
|
||||
{ label: 'Orders', mode: 'spa', path: '/dashboard/orders' },
|
||||
{ label: 'Products', mode: 'spa', path: '/dashboard/products' },
|
||||
@@ -102,7 +102,8 @@ function getStaticFallbackTree(): MainNode[] {
|
||||
label: 'Settings',
|
||||
path: '/settings',
|
||||
icon: 'settings',
|
||||
children: [
|
||||
// Only show submenu in standalone mode
|
||||
children: (window as any).WNW_CONFIG?.standaloneMode ? [
|
||||
// WooNooW Settings
|
||||
{ label: 'WooNooW', mode: 'spa', path: '/settings' },
|
||||
|
||||
@@ -120,7 +121,7 @@ function getStaticFallbackTree(): MainNode[] {
|
||||
{ label: 'Integration', mode: 'bridge', href: `${admin}?page=wc-settings&tab=integration` },
|
||||
{ label: 'Status', mode: 'bridge', href: `${admin}?page=wc-status` },
|
||||
{ label: 'Extensions', mode: 'bridge', href: `${admin}?page=wc-addons` },
|
||||
],
|
||||
] : [],
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user