From 481d01c89f252a38bf85e905ae5e62246405cb53 Mon Sep 17 00:00:00 2001 From: Sisyphus Date: Fri, 26 Jun 2026 17:05:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=AE=80=E5=8C=96=E4=BE=A7=E6=A0=8F=20?= =?UTF-8?q?-=20=E7=A7=BB=E9=99=A4=E5=86=97=E4=BD=99=E7=9A=84=E7=BA=BF?= =?UTF-8?q?=E7=B4=A2=E8=AF=A6=E6=83=85=E8=8F=9C=E5=8D=95=E9=A1=B9=EF=BC=8C?= =?UTF-8?q?=E6=89=81=E5=B9=B3=E5=8C=96=E7=BA=BF=E7=B4=A2=E6=B1=A0=E5=85=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- apps/web/src/components/Sidebar.tsx | 65 +++++------------------------ 1 file changed, 11 insertions(+), 54 deletions(-) diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx index c15d051..1164019 100644 --- a/apps/web/src/components/Sidebar.tsx +++ b/apps/web/src/components/Sidebar.tsx @@ -11,13 +11,6 @@ interface User { role: string } -const sceneGroups: Record = { - inquiry: { label: '询价发布助手', icon: '📋', pages: ['inquiry', 'lead-detail'] }, - product: { label: '商品上架助手', icon: '📦', pages: ['product'] }, - image: { label: '商品生图助手', icon: '🖼️', pages: ['image'] }, - comparison: { label: '智能比价助手', icon: '⚖️', pages: ['comparison'] }, -} - const adminPages: { key: Page; label: string }[] = [ { key: 'admin-tenants', label: '租户管理' }, { key: 'admin-stats', label: '使用统计' }, @@ -37,7 +30,6 @@ export default function Sidebar({ onLogout?: () => void }) { const [expandedGroups, setExpandedGroups] = useState>({ - inquiry: true, system: true, admin: true, }) @@ -45,10 +37,6 @@ export default function Sidebar({ const toggleGroup = (id: string) => setExpandedGroups((prev) => ({ ...prev, [id]: !prev[id] })) - const inScene = Object.entries(sceneGroups).find(([, g]) => - g.pages.includes(current) - ) - const isInAdmin = current.startsWith('admin-') return ( @@ -84,48 +72,17 @@ export default function Sidebar({ 业务场景 -
- - {expandedGroups.inquiry && ( -
- - -
- )} -
+ {[ { id: 'image', key: 'image' as Page, label: '商品生图助手', icon: '🖼️' },