From a821847c4535fbd69cee94eecbb6f3ecfbf3a9c8 Mon Sep 17 00:00:00 2001 From: IGCrystal Date: Sun, 7 Sep 2025 20:02:20 +0800 Subject: [PATCH 1/4] feat: group sidebar navigation --- .../i18n/locales/en-US/core/navigation.json | 7 +- .../i18n/locales/zh-CN/core/navigation.json | 7 +- .../layouts/full/vertical-sidebar/NavItem.vue | 24 +++- .../full/vertical-sidebar/VerticalSidebar.vue | 2 +- .../full/vertical-sidebar/sidebarItem.ts | 109 +++++++++++------- 5 files changed, 105 insertions(+), 44 deletions(-) diff --git a/dashboard/src/i18n/locales/en-US/core/navigation.json b/dashboard/src/i18n/locales/en-US/core/navigation.json index f36724fb2..249ee8b1a 100644 --- a/dashboard/src/i18n/locales/en-US/core/navigation.json +++ b/dashboard/src/i18n/locales/en-US/core/navigation.json @@ -16,5 +16,10 @@ "settings": "Settings", "documentation": "Documentation", "github": "GitHub", - "drag": "Drag" + "drag": "Drag", + "groups": { + "platform": "Platform", + "configuration": "Configuration", + "others": "Others" + } } \ No newline at end of file diff --git a/dashboard/src/i18n/locales/zh-CN/core/navigation.json b/dashboard/src/i18n/locales/zh-CN/core/navigation.json index 0953b1046..cff73d7cf 100644 --- a/dashboard/src/i18n/locales/zh-CN/core/navigation.json +++ b/dashboard/src/i18n/locales/zh-CN/core/navigation.json @@ -16,5 +16,10 @@ "settings": "设置", "documentation": "官方文档", "github": "GitHub", - "drag": "拖拽" + "drag": "拖拽", + "groups": { + "platform": "平台", + "configuration": "配置", + "others": "其他" + } } \ No newline at end of file diff --git a/dashboard/src/layouts/full/vertical-sidebar/NavItem.vue b/dashboard/src/layouts/full/vertical-sidebar/NavItem.vue index c81b107df..83728f708 100644 --- a/dashboard/src/layouts/full/vertical-sidebar/NavItem.vue +++ b/dashboard/src/layouts/full/vertical-sidebar/NavItem.vue @@ -6,7 +6,28 @@ const { t } = useI18n(); + + \ No newline at end of file From 6ed2f6954437b1f3899bd1a29ef1d14885c51256 Mon Sep 17 00:00:00 2001 From: IGCrystal Date: Sun, 7 Sep 2025 20:56:04 +0800 Subject: [PATCH 3/4] fix: align children in one column --- .../src/layouts/full/vertical-sidebar/NavItem.vue | 13 ++++++++++++- .../full/vertical-sidebar/VerticalSidebar.vue | 15 ++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/dashboard/src/layouts/full/vertical-sidebar/NavItem.vue b/dashboard/src/layouts/full/vertical-sidebar/NavItem.vue index 83728f708..91cebf72a 100644 --- a/dashboard/src/layouts/full/vertical-sidebar/NavItem.vue +++ b/dashboard/src/layouts/full/vertical-sidebar/NavItem.vue @@ -1,8 +1,17 @@ + @@ -35,7 +46,7 @@ const { t } = useI18n(); color="secondary" :disabled="item.disabled" :target="item.type === 'external' ? '_blank' : ''" - :style="level > 0 ? { paddingLeft: '32px' } : {}" + :style="itemStyle" >