From c37fff0d094f0d1cf018053ad39decd492909494 Mon Sep 17 00:00:00 2001 From: imeepos Date: Thu, 14 Aug 2025 15:19:51 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=AE=80=E5=8C=96=E5=AF=BC?= =?UTF-8?q?=E8=88=AA=E8=8F=9C=E5=8D=95=E7=BB=93=E6=9E=84=E5=92=8C=E6=B8=85?= =?UTF-8?q?=E7=90=86=E6=9C=AA=E4=BD=BF=E7=94=A8=E7=9A=84=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 改进: - 移除未使用的图标导入 (ChartBarIcon, RectangleStackIcon, PlayIcon, ServerIcon) - 简化工具菜单结构,移除子菜单 - 将工具菜单改为直接链接到 /tools 页面 - 优化代码格式和换行 用户体验: - 简化导航结构,减少点击层级 - 更直观的工具访问方式 --- apps/desktop/src/components/Navigation.tsx | 55 +++++++--------------- 1 file changed, 16 insertions(+), 39 deletions(-) diff --git a/apps/desktop/src/components/Navigation.tsx b/apps/desktop/src/components/Navigation.tsx index 43c6d00..659a959 100644 --- a/apps/desktop/src/components/Navigation.tsx +++ b/apps/desktop/src/components/Navigation.tsx @@ -8,10 +8,7 @@ import { WrenchScrewdriverIcon, SparklesIcon, ChevronDownIcon, - ChartBarIcon, - RectangleStackIcon, } from '@heroicons/react/24/outline'; -import { PlayIcon, ServerIcon } from 'lucide-react'; // 导航项类型定义 interface NavItem { @@ -75,21 +72,8 @@ const Navigation: React.FC = () => { { name: '工具', icon: WrenchScrewdriverIcon, - description: 'AI检索图片/数据清洗工具', - children: [ - { - name: '工具中心', - href: '/tools', - icon: WrenchScrewdriverIcon, - description: 'AI检索图片/数据清洗工具' - }, - { - name: 'TVAI FFmpeg 命令生成器', - href: '/tools/command-generator', - icon: CpuChipIcon, - description: '生成 Topaz Video AI FFmpeg 命令' - } - ] + href: '/tools', + description: 'AI检索图片/数据清洗工具' } ]; @@ -152,23 +136,20 @@ const Navigation: React.FC = () => {
{/* 下拉菜单 */} @@ -182,17 +163,15 @@ const Navigation: React.FC = () => { setOpenDropdown(null)} > - +
{child.name}
{child.description}
@@ -213,19 +192,17 @@ const Navigation: React.FC = () => { {active && (
)} - + {item.name} );