From 47207dab1981e5a41b82b0c152fed136c69cf7e9 Mon Sep 17 00:00:00 2001 From: Xin Wang Date: Wed, 4 Feb 2026 16:35:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BE=B9=E6=A0=8F=E7=BC=A9=E7=95=A5=E5=9B=BE?= =?UTF-8?q?=EF=BC=8C=E5=B0=8F=E5=8A=A9=E6=89=8B=E6=B7=BB=E5=8A=A0=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E9=85=8D=E7=BD=AE=EF=BC=8C=E6=B7=BB=E5=8A=A0=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=B5=8B=E8=AF=95=E5=A4=A7=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.tsx | 60 +++++--- pages/Assistants.tsx | 259 ++++++++++++++++++++++++++++++-- pages/AutoTest.tsx | 326 +++++++++++++++++++++++++++++++++++++++++ pages/VoiceLibrary.tsx | 263 ++++++++++++++++++++++++++++++--- services/mockData.ts | 25 +++- types.ts | 25 +++- 6 files changed, 900 insertions(+), 58 deletions(-) create mode 100644 pages/AutoTest.tsx diff --git a/App.tsx b/App.tsx index 0f55462..007e71d 100644 --- a/App.tsx +++ b/App.tsx @@ -1,7 +1,7 @@ -import React from 'react'; +import React, { useState } from 'react'; import { HashRouter as Router, Routes, Route, Link, useLocation } from 'react-router-dom'; -import { Bot, Phone, Book, User, LayoutDashboard, Mic2, Video, GitBranch } from 'lucide-react'; +import { Bot, Phone, Book, User, LayoutDashboard, Mic2, Video, GitBranch, Zap, PanelLeftClose, PanelLeftOpen } from 'lucide-react'; import { AssistantsPage } from './pages/Assistants'; import { KnowledgeBasePage } from './pages/KnowledgeBase'; @@ -11,19 +11,22 @@ import { DashboardPage } from './pages/Dashboard'; import { VoiceLibraryPage } from './pages/VoiceLibrary'; import { WorkflowsPage } from './pages/Workflows'; import { WorkflowEditorPage } from './pages/WorkflowEditor'; +import { AutoTestPage } from './pages/AutoTest'; -const SidebarItem: React.FC<{ to: string; icon: React.ReactNode; label: string; active: boolean }> = ({ to, icon, label, active }) => ( +const SidebarItem: React.FC<{ to: string; icon: React.ReactNode; label: string; active: boolean; isCollapsed: boolean }> = ({ to, icon, label, active, isCollapsed }) => ( - {icon} - {label} +
{icon}
+ {!isCollapsed && {label}} ); const AppLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => { const location = useLocation(); + const [isCollapsed, setIsCollapsed] = useState(false); const navItems = [ { path: '/', label: '首页', icon: }, @@ -32,46 +35,66 @@ const AppLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => { { path: '/call-logs', label: '视频通话记录', icon: }, { path: '/knowledge', label: '知识库', icon: }, { path: '/workflows', label: '工作流', icon: }, + { path: '/auto-test', label: '自动测试', icon: }, { path: '/profile', label: '个人中心', icon: }, ]; return (
- {/* Sidebar with Glass effect */} -