From 6719c02d056f0e253df890821668c4abfd3e1c9d Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 22 Jun 2026 11:58:40 +0800 Subject: [PATCH] fix sidebar --- frontend/components/layout/sidebar.tsx | 41 +++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/frontend/components/layout/sidebar.tsx b/frontend/components/layout/sidebar.tsx index fd4a3fb1..ae3d1648 100644 --- a/frontend/components/layout/sidebar.tsx +++ b/frontend/components/layout/sidebar.tsx @@ -44,6 +44,7 @@ import { AlertDialogTitle, } from "@/components/ui/alert-dialog" import { + ArrowUpRight, Bell, ChevronDown, Code, @@ -163,9 +164,13 @@ export function AppSidebar({ ...props }: React.ComponentProps) { const adminFiltered = React.useMemo(() => { const displayConfig = parseMenuDisplayConfig(config?.menu_display_config) - return data.admin.filter((item) => displayConfig[item.url]) + return data.admin.filter((item) => displayConfig[item.url] !== false) }, [config]) + const documentFiltered = React.useMemo(() => { + const displayConfig = parseMenuDisplayConfig(config?.menu_display_config) + return data.document.filter((item) => displayConfig[item.url] !== false) + }, [config]) return ( <> @@ -324,6 +329,40 @@ export function AppSidebar({ ...props }: React.ComponentProps) { )} + {documentFiltered.length > 0 && ( + + + 文档库 + + + + {documentFiltered.map((item) => ( + + + {item.external ? ( + + {item.icon && } + {item.title} + + + ) : ( + + {item.icon && } + {item.title} + + )} + + + ))} + + + + )} +