From a70caae2da4d01c7c08a5508e00a36d9afaf21c3 Mon Sep 17 00:00:00 2001 From: lemon Date: Sat, 16 May 2026 11:18:03 -0700 Subject: [PATCH] Allow dashboard page sidebar add --- src/lib/sidebarItems.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/lib/sidebarItems.tsx b/src/lib/sidebarItems.tsx index 9a1269cd..b80fd5b3 100644 --- a/src/lib/sidebarItems.tsx +++ b/src/lib/sidebarItems.tsx @@ -1,4 +1,5 @@ import { + Activity, Award, BadgeCheck, Bell, @@ -195,11 +196,21 @@ export const SIDEBAR_ITEMS: SidebarItemDef[] = [ { id: "world", label: "World", path: "/world", icon: Earth }, ]; +/** + * Sidebar items that are addable from their own page but omitted from the + * default/sidebar customization option list. + */ +const OPTIONAL_SIDEBAR_ITEMS: SidebarItemDef[] = [ + { id: "dashboard", label: "Dashboard", path: "/dashboard", icon: Activity }, +]; + +const ALL_SIDEBAR_ITEMS = [...SIDEBAR_ITEMS, ...OPTIONAL_SIDEBAR_ITEMS]; + /** Set of all known sidebar item IDs for quick lookup. */ -export const SIDEBAR_ITEM_IDS = new Set(SIDEBAR_ITEMS.map((s) => s.id)); +export const SIDEBAR_ITEM_IDS = new Set(ALL_SIDEBAR_ITEMS.map((s) => s.id)); /** Map from ID to definition for O(1) lookup. */ -const SIDEBAR_ITEM_MAP = new Map(SIDEBAR_ITEMS.map((s) => [s.id, s])); +const SIDEBAR_ITEM_MAP = new Map(ALL_SIDEBAR_ITEMS.map((s) => [s.id, s])); /** * Icons for content types used outside the sidebar (e.g. ContentSettings).