@orsetra/shared-ui 1.0.17 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -29,12 +29,12 @@ export interface SidebarMenus {
|
|
|
29
29
|
|
|
30
30
|
export const menuItems: MainMenuItem[] = [
|
|
31
31
|
{
|
|
32
|
-
id: "assets",
|
|
32
|
+
id: "assets-manager",
|
|
33
33
|
label: "Assets",
|
|
34
34
|
icon: <Rocket className="h-6 w-6" />
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
|
-
id: "applications",
|
|
37
|
+
id: "applications-manager",
|
|
38
38
|
label: "Applications",
|
|
39
39
|
icon: <Package className="h-6 w-6" />
|
|
40
40
|
},
|
|
@@ -52,8 +52,8 @@ export const menuItems: MainMenuItem[] = [
|
|
|
52
52
|
|
|
53
53
|
// Labels des menus principaux pour l'affichage
|
|
54
54
|
export const menuLabels: Record<string, string> = {
|
|
55
|
-
"assets": "Assets",
|
|
56
|
-
"applications": "Applications",
|
|
55
|
+
"assets-manager": "Assets",
|
|
56
|
+
"applications-manager": "Applications",
|
|
57
57
|
"api-manager": "API Manager",
|
|
58
58
|
"access-manager": "Access Manager"
|
|
59
59
|
}
|
|
@@ -178,8 +178,11 @@ function Sidebar({ currentMenu, onMainMenuToggle, sidebarMenus = {} }: SidebarPr
|
|
|
178
178
|
const pathname = usePathname()
|
|
179
179
|
const { state } = useSidebar()
|
|
180
180
|
|
|
181
|
-
//
|
|
182
|
-
|
|
181
|
+
// Micro apps: utilise 'items' comme clé standard
|
|
182
|
+
// Main app: utilise currentMenu pour sélectionner le bon groupe
|
|
183
|
+
const currentNavigation: SubMenuItem[] = sidebarMenus['items']
|
|
184
|
+
|| (currentMenu && sidebarMenus[currentMenu])
|
|
185
|
+
|| []
|
|
183
186
|
|
|
184
187
|
return (
|
|
185
188
|
<div className="h-screen sticky top-0 flex flex-col bg-white border-r border-ui-border min-w-[var(--sidebar-width-icon)] transition-[width] duration-200"
|