From 5416916f0f067ed3beb31d7b0f7ededf6510e861 Mon Sep 17 00:00:00 2001 From: jingrow Date: Fri, 19 Dec 2025 23:21:56 +0800 Subject: [PATCH] Add documentation for default menu visibility rules - Add comment to getDefaultMenus() explaining menu visibility filtering - Document that pagetype/workspace menus are System User only - Document that App/Node/Agent marketplaces are System User only - Ensure default menu documentation matches filtering logic --- apps/jingrow/frontend/src/shared/stores/menu.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/jingrow/frontend/src/shared/stores/menu.ts b/apps/jingrow/frontend/src/shared/stores/menu.ts index f71d825..6d427be 100644 --- a/apps/jingrow/frontend/src/shared/stores/menu.ts +++ b/apps/jingrow/frontend/src/shared/stores/menu.ts @@ -44,6 +44,10 @@ function saveToStorage(items: AppMenuItem[]) { } // 默认菜单,与现有路由对应 +// 注意:非 System User 用户只能看到部分菜单项(通过 visibleItems 过滤) +// - pagetype 和 workspace 类型菜单仅对 System User 可见 +// - 开发分组下的应用市场、节点市场、智能体市场仅对 System User 可见 +// - 非 System User 只能看到工具市场 function getDefaultMenus(): AppMenuItem[] { return [ { id: 'dashboard', key: 'Dashboard', label: 'Dashboard', icon: 'tabler:dashboard', routeName: 'Dashboard', order: 1, type: 'route' },