Better UX

This commit is contained in:
Xin Wang
2026-02-04 18:36:40 +08:00
parent 47207dab19
commit b608c395c7
14 changed files with 877 additions and 403 deletions

18
App.tsx
View File

@@ -1,11 +1,11 @@
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, Zap, PanelLeftClose, PanelLeftOpen } from 'lucide-react';
import { Bot, Phone, Book, User, LayoutDashboard, Mic2, Video, GitBranch, Zap, PanelLeftClose, PanelLeftOpen, History as HistoryIcon } from 'lucide-react';
import { AssistantsPage } from './pages/Assistants';
import { KnowledgeBasePage } from './pages/KnowledgeBase';
import { CallLogsPage } from './pages/CallLogs';
import { HistoryPage } from './pages/History';
import { ProfilePage } from './pages/Profile';
import { DashboardPage } from './pages/Dashboard';
import { VoiceLibraryPage } from './pages/VoiceLibrary';
@@ -32,10 +32,10 @@ const AppLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
{ path: '/', label: '首页', icon: <LayoutDashboard className="h-5 w-5" /> },
{ path: '/assistants', label: '小助手', icon: <Bot className="h-5 w-5" /> },
{ path: '/voices', label: '声音库', icon: <Mic2 className="h-5 w-5" /> },
{ path: '/call-logs', label: '视频通话记录', icon: <Phone className="h-5 w-5" /> },
{ path: '/history', label: '历史记录', icon: <HistoryIcon className="h-5 w-5" /> },
{ path: '/knowledge', label: '知识库', icon: <Book className="h-5 w-5" /> },
{ path: '/workflows', label: '工作流', icon: <GitBranch className="h-5 w-5" /> },
{ path: '/auto-test', label: '自动测试', icon: <Zap className="h-5 w-5" /> },
{ path: '/auto-test', label: '测试助手', icon: <Zap className="h-5 w-5" /> },
{ path: '/profile', label: '个人中心', icon: <User className="h-5 w-5" /> },
];
@@ -51,7 +51,7 @@ const AppLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
</div>
{!isCollapsed && (
<span className="text-lg font-bold tracking-wide whitespace-nowrap bg-clip-text text-transparent bg-gradient-to-r from-white to-white/80 animate-in slide-in-from-left-2">
AI VideoAssistant
AI视频助手
</span>
)}
</div>
@@ -73,7 +73,7 @@ const AppLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
<div className={`p-4 border-t border-border/40 flex items-center transition-all duration-300 ${isCollapsed ? 'justify-center' : 'justify-between'}`}>
{!isCollapsed && (
<span className="text-[10px] text-muted-foreground font-mono opacity-60 animate-in fade-in">
SYSTEM v2.0
SYSTEM v1.0
</span>
)}
<button
@@ -92,9 +92,9 @@ const AppLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
<div className="h-8 w-8 bg-gradient-to-br from-cyan-400 to-blue-600 rounded-lg flex items-center justify-center shadow-lg">
<Video className="h-5 w-5 text-white" />
</div>
<span className="font-bold text-lg whitespace-nowrap text-white">AI VideoAssistant</span>
<span className="font-bold text-lg whitespace-nowrap text-white">AI视频助手</span>
</header>
<div className="flex-1 overflow-auto p-4 md:p-6 transition-all duration-300">
<div className="flex-1 overflow-auto p-2 md:p-4 transition-all duration-300">
{children}
</div>
</main>
@@ -111,7 +111,7 @@ const App: React.FC = () => {
<Route path="/assistants" element={<AssistantsPage />} />
<Route path="/voices" element={<VoiceLibraryPage />} />
<Route path="/knowledge" element={<KnowledgeBasePage />} />
<Route path="/call-logs" element={<CallLogsPage />} />
<Route path="/history" element={<HistoryPage />} />
<Route path="/workflows" element={<WorkflowsPage />} />
<Route path="/workflows/new" element={<WorkflowEditorPage />} />
<Route path="/workflows/edit/:id" element={<WorkflowEditorPage />} />