From 3bc689d572e14c31ce0de887ef1de2e0dbed0938 Mon Sep 17 00:00:00 2001 From: Z8MB1E Date: Sun, 6 Sep 2026 17:22:58 -0400 Subject: [PATCH] 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 --- src/components/frontend/blocks/AppSidebar.tsx | 14 +-- src/components/frontend/blocks/sidebarData.ts | 114 +++++++++--------- 2 files changed, 58 insertions(+), 70 deletions(-) diff --git a/src/components/frontend/blocks/AppSidebar.tsx b/src/components/frontend/blocks/AppSidebar.tsx index 3810f45..725d7eb 100644 --- a/src/components/frontend/blocks/AppSidebar.tsx +++ b/src/components/frontend/blocks/AppSidebar.tsx @@ -138,20 +138,10 @@ export function AppSidebar({
{hasIntelligence && ( - - typeof i.items === "object" ? { ...i, items: [...i.items] } : { ...i }, - )} - /> + )} {hasLogistics && ( - - typeof i.items === "object" ? { ...i, items: [...i.items] } : { ...i }, - )} - /> + )} diff --git a/src/components/frontend/blocks/sidebarData.ts b/src/components/frontend/blocks/sidebarData.ts index a32e822..fd6e93c 100644 --- a/src/components/frontend/blocks/sidebarData.ts +++ b/src/components/frontend/blocks/sidebarData.ts @@ -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: [