From d170058509c2f0d902f1ea8c448d6b93741f08fe Mon Sep 17 00:00:00 2001 From: Hyko Date: Sun, 26 Apr 2026 11:04:19 -0400 Subject: [PATCH] refactor(icons): add categoryIcon support for representative category icons - add optional `categoryIcon` flag to icon metadata helper in add-remove.js and business.js - mark Add01Icon and ChartLineData01Icon as category representative icons - use categoryIcon flag in IconsPage to display the most representative icon per category - add `cursor-pointer` to category sidebar buttons and widen sidebar from 200px to 250px --- src/features/admin/devkit/IconsPage.client.js | 10 ++++++---- src/shared/icons/add-remove.js | 3 ++- src/shared/icons/business.js | 3 ++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/features/admin/devkit/IconsPage.client.js b/src/features/admin/devkit/IconsPage.client.js index 2656efd..ebbdcfc 100644 --- a/src/features/admin/devkit/IconsPage.client.js +++ b/src/features/admin/devkit/IconsPage.client.js @@ -18,7 +18,9 @@ export default function IconsPage() { const cat = Icon.category; if (!cat) continue; if (!map.has(cat)) map.set(cat, { count: 0, FirstIcon: Icon }); - map.get(cat).count += 1; + const entry = map.get(cat); + entry.count += 1; + if (Icon.categoryIcon) entry.FirstIcon = Icon; } return Array.from(map.entries()).sort(([a], [b]) => a.localeCompare(b)); }, []); @@ -103,14 +105,14 @@ export default function IconsPage() { {hasSidebar && ( -
+
Catégories