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:
parent
35d992e597
commit
9c89831f20
1 changed files with 41 additions and 28 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import * as React from "react";
|
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 { NavCore } from "@/components/frontend/blocks/NavCore";
|
||||||
import { NavSecondary } from "@/components/frontend/blocks/NavSecondary";
|
import { NavSecondary } from "@/components/frontend/blocks/NavSecondary";
|
||||||
|
|
@ -18,14 +18,20 @@ import {
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import XPDisplay from "@/components/frontend/blocks/XPDisplay";
|
import XPDisplay from "@/components/frontend/blocks/XPDisplay";
|
||||||
|
import type { ResolvedLevel } from "@/utils/xp/resolveLevel";
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
navMain: [
|
navMain: [
|
||||||
{
|
{
|
||||||
title: "Dashboard",
|
title: "Dashboard",
|
||||||
url: "#",
|
url: "/",
|
||||||
icon: Bolt,
|
icon: Bolt,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "Roster",
|
||||||
|
url: "/roster",
|
||||||
|
icon: Users,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "Settings",
|
title: "Settings",
|
||||||
url: "#",
|
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: [
|
navLogistics: [
|
||||||
{
|
{
|
||||||
title: "Logistics",
|
title: "Logistics",
|
||||||
|
|
@ -59,42 +86,27 @@ const data = {
|
||||||
{
|
{
|
||||||
title: "Structures",
|
title: "Structures",
|
||||||
url: "/logistics",
|
url: "/logistics",
|
||||||
// icon: Building2,
|
},
|
||||||
|
{
|
||||||
|
title: "Resources",
|
||||||
|
url: "/logistics/resources",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Vehicles",
|
||||||
|
url: "/logistics/vehicles",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Market",
|
title: "Market",
|
||||||
url: "#",
|
url: "#",
|
||||||
// icon: CircleDollarSign,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Shipments",
|
title: "Shipments",
|
||||||
url: "#",
|
url: "#",
|
||||||
// icon: CircleDollarSign,
|
|
||||||
},
|
},
|
||||||
/*{
|
|
||||||
title: "Vehicles",
|
|
||||||
url: "#",
|
|
||||||
// icon: Truck,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Resources",
|
|
||||||
url: "#",
|
|
||||||
// icon: PackageOpen,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Structures",
|
|
||||||
url: "#",
|
|
||||||
// icon: Building2,
|
|
||||||
},*/
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
navSecondary: [
|
navSecondary: [
|
||||||
/*{
|
|
||||||
title: "Support",
|
|
||||||
url: "https://onyxsimple.youtrack.cloud",
|
|
||||||
icon: LifeBuoy,
|
|
||||||
},*/
|
|
||||||
{
|
{
|
||||||
title: "Feedback",
|
title: "Feedback",
|
||||||
url: "https://onyxsimple.youtrack.cloud",
|
url: "https://onyxsimple.youtrack.cloud",
|
||||||
|
|
@ -105,7 +117,7 @@ const data = {
|
||||||
|
|
||||||
export function AppSidebar({
|
export function AppSidebar({
|
||||||
user,
|
user,
|
||||||
xp,
|
xpLevel,
|
||||||
adminUrl,
|
adminUrl,
|
||||||
...props
|
...props
|
||||||
}: {
|
}: {
|
||||||
|
|
@ -113,7 +125,7 @@ export function AppSidebar({
|
||||||
displayName: string;
|
displayName: string;
|
||||||
username: string;
|
username: string;
|
||||||
};
|
};
|
||||||
xp: number;
|
xpLevel: ResolvedLevel;
|
||||||
adminUrl?: string;
|
adminUrl?: string;
|
||||||
} & React.ComponentProps<typeof Sidebar>) {
|
} & React.ComponentProps<typeof Sidebar>) {
|
||||||
return (
|
return (
|
||||||
|
|
@ -145,6 +157,7 @@ export function AppSidebar({
|
||||||
</SidebarHeader>
|
</SidebarHeader>
|
||||||
<SidebarContent>
|
<SidebarContent>
|
||||||
<NavCore label="Platform" items={data.navMain} />
|
<NavCore label="Platform" items={data.navMain} />
|
||||||
|
<NavCore label="Intelligence" items={data.navIntelligence} />
|
||||||
<NavCore label="Infrastructure" items={data.navLogistics} />
|
<NavCore label="Infrastructure" items={data.navLogistics} />
|
||||||
{/*<NavProjects projects={data.projects} />*/}
|
{/*<NavProjects projects={data.projects} />*/}
|
||||||
<NavSecondary
|
<NavSecondary
|
||||||
|
|
@ -162,7 +175,7 @@ export function AppSidebar({
|
||||||
}
|
}
|
||||||
className="mt-auto"
|
className="mt-auto"
|
||||||
/>
|
/>
|
||||||
<XPDisplay xp={xp} />
|
<XPDisplay xpLevel={xpLevel} />
|
||||||
</SidebarContent>
|
</SidebarContent>
|
||||||
<SidebarFooter>
|
<SidebarFooter>
|
||||||
<NavUser
|
<NavUser
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue