refactor(nav): flatten sidebar sections into direct links
Replace nested section submenus in Intelligence, Infrastructure, and Personnel with flat per-page links carrying icons; drop the defensive item copying in AppSidebar. Ultraworked with [Sisyphus](https://github.com/code-yeongju/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
parent
b558569b8e
commit
3bc689d572
2 changed files with 58 additions and 70 deletions
|
|
@ -138,20 +138,10 @@ export function AppSidebar({
|
|||
<div className="flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto group-data-[collapsible=icon]:overflow-hidden">
|
||||
<NavCore label="Platform" items={data.navMain} />
|
||||
{hasIntelligence && (
|
||||
<NavCore
|
||||
label="Intelligence"
|
||||
items={data.navIntelligence.map((i) =>
|
||||
typeof i.items === "object" ? { ...i, items: [...i.items] } : { ...i },
|
||||
)}
|
||||
/>
|
||||
<NavCore label="Intelligence" items={data.navIntelligence} />
|
||||
)}
|
||||
{hasLogistics && (
|
||||
<NavCore
|
||||
label="Infrastructure"
|
||||
items={data.navLogistics.map((i) =>
|
||||
typeof i.items === "object" ? { ...i, items: [...i.items] } : { ...i },
|
||||
)}
|
||||
/>
|
||||
<NavCore label="Infrastructure" items={data.navLogistics} />
|
||||
)}
|
||||
<NavCore label="Helpdesk" items={data.navHelpdesk} />
|
||||
<NavCore label="Commerce" items={data.navCommerce} />
|
||||
|
|
|
|||
|
|
@ -1,16 +1,24 @@
|
|||
import {
|
||||
Award,
|
||||
Backpack,
|
||||
BarChart3,
|
||||
BookOpen,
|
||||
Boxes,
|
||||
Building2,
|
||||
Car,
|
||||
Contact,
|
||||
Crosshair,
|
||||
Flag,
|
||||
Kanban,
|
||||
LifeBuoy,
|
||||
Package,
|
||||
Search,
|
||||
Send,
|
||||
ShoppingBag,
|
||||
Swords,
|
||||
TrendingUp,
|
||||
Truck,
|
||||
UserCog,
|
||||
Warehouse,
|
||||
} from "lucide-react";
|
||||
|
||||
export const sidebarData = {
|
||||
|
|
@ -33,56 +41,51 @@ export const sidebarData = {
|
|||
],
|
||||
navIntelligence: [
|
||||
{
|
||||
title: "Intelligence",
|
||||
url: "#",
|
||||
title: "Campaigns",
|
||||
url: "/intelligence/campaigns",
|
||||
icon: Swords,
|
||||
},
|
||||
{
|
||||
title: "Missions",
|
||||
url: "/intelligence/missions",
|
||||
icon: Crosshair,
|
||||
items: [
|
||||
{
|
||||
title: "Campaigns",
|
||||
url: "/intelligence/campaigns",
|
||||
},
|
||||
{
|
||||
title: "Missions",
|
||||
url: "/intelligence/missions",
|
||||
},
|
||||
{
|
||||
title: "Factions",
|
||||
url: "/intelligence/factions",
|
||||
},
|
||||
{
|
||||
title: "Wiki",
|
||||
url: "/wiki",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Factions",
|
||||
url: "/intelligence/factions",
|
||||
icon: Flag,
|
||||
},
|
||||
{
|
||||
title: "Wiki",
|
||||
url: "/wiki",
|
||||
icon: BookOpen,
|
||||
},
|
||||
],
|
||||
navLogistics: [
|
||||
{
|
||||
title: "Logistics",
|
||||
url: "#",
|
||||
icon: Warehouse,
|
||||
items: [
|
||||
{
|
||||
title: "Structures",
|
||||
url: "/logistics",
|
||||
},
|
||||
{
|
||||
title: "Resources",
|
||||
url: "/logistics/resources",
|
||||
},
|
||||
{
|
||||
title: "Vehicles",
|
||||
url: "/logistics/vehicles",
|
||||
},
|
||||
{
|
||||
title: "Shipments",
|
||||
url: "/logistics/shipments",
|
||||
},
|
||||
{
|
||||
title: "Deployed Vehicles",
|
||||
url: "/logistics/game-vehicles",
|
||||
},
|
||||
],
|
||||
title: "Structures",
|
||||
url: "/logistics",
|
||||
icon: Building2,
|
||||
},
|
||||
{
|
||||
title: "Resources",
|
||||
url: "/logistics/resources",
|
||||
icon: Boxes,
|
||||
},
|
||||
{
|
||||
title: "Vehicles",
|
||||
url: "/logistics/vehicles",
|
||||
icon: Truck,
|
||||
},
|
||||
{
|
||||
title: "Shipments",
|
||||
url: "/logistics/shipments",
|
||||
icon: Package,
|
||||
},
|
||||
{
|
||||
title: "Deployed Vehicles",
|
||||
url: "/logistics/game-vehicles",
|
||||
icon: Car,
|
||||
},
|
||||
],
|
||||
navCommerce: [
|
||||
|
|
@ -99,19 +102,14 @@ export const sidebarData = {
|
|||
],
|
||||
navPersonnel: [
|
||||
{
|
||||
title: "Personnel",
|
||||
url: "#",
|
||||
title: "Contacts",
|
||||
url: "/personnel/contacts",
|
||||
icon: Contact,
|
||||
items: [
|
||||
{
|
||||
title: "Contacts",
|
||||
url: "/personnel/contacts",
|
||||
},
|
||||
{
|
||||
title: "Statistics",
|
||||
url: "/personnel/statistics",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Statistics",
|
||||
url: "/personnel/statistics",
|
||||
icon: BarChart3,
|
||||
},
|
||||
],
|
||||
navPersonal: [
|
||||
|
|
|
|||
Loading…
Reference in a new issue