1
0
Fork 0

refactor: update sidebar navigation with new sections

- Add Intelligence section with Campaigns, Missions, and Factions links
- Add Roster link to main navigation
- Update Logistics section with Resources and Vehicles links
- Update XPDisplay prop from xp to xpLevel for level resolution
- Remove commented-out navigation items
This commit is contained in:
Jason Fraley 2026-07-31 20:04:28 -04:00
parent 35d992e597
commit 9c89831f20

View file

@ -1,7 +1,7 @@
"use client";
import * as React from "react";
import { Bolt, Send, Settings2, Shield, Warehouse } from "lucide-react";
import { Bolt, Send, Settings2, Shield, Users, Warehouse, Crosshair } from "lucide-react";
import { NavCore } from "@/components/frontend/blocks/NavCore";
import { NavSecondary } from "@/components/frontend/blocks/NavSecondary";
@ -18,14 +18,20 @@ import {
import Image from "next/image";
import Link from "next/link";
import XPDisplay from "@/components/frontend/blocks/XPDisplay";
import type { ResolvedLevel } from "@/utils/xp/resolveLevel";
const data = {
navMain: [
{
title: "Dashboard",
url: "#",
url: "/",
icon: Bolt,
},
{
title: "Roster",
url: "/roster",
icon: Users,
},
{
title: "Settings",
url: "#",
@ -50,6 +56,27 @@ const data = {
],
},
],
navIntelligence: [
{
title: "Intelligence",
url: "#",
icon: Crosshair,
items: [
{
title: "Campaigns",
url: "/intelligence/campaigns",
},
{
title: "Missions",
url: "/intelligence/missions",
},
{
title: "Factions",
url: "/intelligence/factions",
},
],
},
],
navLogistics: [
{
title: "Logistics",
@ -59,42 +86,27 @@ const data = {
{
title: "Structures",
url: "/logistics",
// icon: Building2,
},
{
title: "Resources",
url: "/logistics/resources",
},
{
title: "Vehicles",
url: "/logistics/vehicles",
},
{
title: "Market",
url: "#",
// icon: CircleDollarSign,
},
{
title: "Shipments",
url: "#",
// icon: CircleDollarSign,
},
/*{
title: "Vehicles",
url: "#",
// icon: Truck,
},
{
title: "Resources",
url: "#",
// icon: PackageOpen,
},
{
title: "Structures",
url: "#",
// icon: Building2,
},*/
],
},
],
navSecondary: [
/*{
title: "Support",
url: "https://onyxsimple.youtrack.cloud",
icon: LifeBuoy,
},*/
{
title: "Feedback",
url: "https://onyxsimple.youtrack.cloud",
@ -105,7 +117,7 @@ const data = {
export function AppSidebar({
user,
xp,
xpLevel,
adminUrl,
...props
}: {
@ -113,7 +125,7 @@ export function AppSidebar({
displayName: string;
username: string;
};
xp: number;
xpLevel: ResolvedLevel;
adminUrl?: string;
} & React.ComponentProps<typeof Sidebar>) {
return (
@ -145,6 +157,7 @@ export function AppSidebar({
</SidebarHeader>
<SidebarContent>
<NavCore label="Platform" items={data.navMain} />
<NavCore label="Intelligence" items={data.navIntelligence} />
<NavCore label="Infrastructure" items={data.navLogistics} />
{/*<NavProjects projects={data.projects} />*/}
<NavSecondary
@ -162,7 +175,7 @@ export function AppSidebar({
}
className="mt-auto"
/>
<XPDisplay xp={xp} />
<XPDisplay xpLevel={xpLevel} />
</SidebarContent>
<SidebarFooter>
<NavUser