Update workflow

This commit is contained in:
Xin Wang
2026-02-02 10:10:24 +08:00
parent ae391a8aa7
commit 75914cf2e6
7 changed files with 1017 additions and 282 deletions

19
App.tsx
View File

@@ -1,6 +1,7 @@
import React, { useState } from 'react';
import { HashRouter as Router, Routes, Route, Link, useLocation, Navigate } from 'react-router-dom';
import { Bot, Phone, Book, User, LayoutDashboard, Cpu, Mic2, Video } from 'lucide-react';
import React 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 { AssistantsPage } from './pages/Assistants';
import { KnowledgeBasePage } from './pages/KnowledgeBase';
@@ -8,6 +9,8 @@ import { CallLogsPage } from './pages/CallLogs';
import { ProfilePage } from './pages/Profile';
import { DashboardPage } from './pages/Dashboard';
import { VoiceLibraryPage } from './pages/VoiceLibrary';
import { WorkflowsPage } from './pages/Workflows';
import { WorkflowEditorPage } from './pages/WorkflowEditor';
const SidebarItem: React.FC<{ to: string; icon: React.ReactNode; label: string; active: boolean }> = ({ to, icon, label, active }) => (
<Link
@@ -28,6 +31,7 @@ const AppLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
{ path: '/voices', label: '声音库', icon: <Mic2 className="h-5 w-5" /> },
{ path: '/call-logs', label: '视频通话记录', icon: <Phone 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: '/profile', label: '个人中心', icon: <User className="h-5 w-5" /> },
];
@@ -36,11 +40,9 @@ const AppLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
{/* Sidebar with Glass effect */}
<aside className="w-64 border-r border-border/40 bg-card/30 backdrop-blur-md hidden md:flex flex-col">
<div className="p-6 flex items-center space-x-3 border-b border-border/40 overflow-hidden">
{/* Cool Logo */}
<div className="h-10 w-10 shrink-0 bg-gradient-to-br from-cyan-400 to-blue-600 rounded-xl flex items-center justify-center shadow-[0_0_20px_rgba(6,182,212,0.5)] border border-white/10">
<Video className="h-6 w-6 text-white drop-shadow-md" />
</div>
{/* No Wrap Title */}
<span className="text-lg font-bold tracking-wide whitespace-nowrap bg-clip-text text-transparent bg-gradient-to-r from-white to-white/80">
AI VideoAssistant
</span>
@@ -69,7 +71,7 @@ const AppLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
</div>
<span className="font-bold text-lg whitespace-nowrap">AI VideoAssistant</span>
</header>
<div className="flex-1 overflow-auto p-6 md:p-8">
<div className="flex-1 overflow-auto p-4 md:p-6">
{children}
</div>
</main>
@@ -87,6 +89,9 @@ const App: React.FC = () => {
<Route path="/voices" element={<VoiceLibraryPage />} />
<Route path="/knowledge" element={<KnowledgeBasePage />} />
<Route path="/call-logs" element={<CallLogsPage />} />
<Route path="/workflows" element={<WorkflowsPage />} />
<Route path="/workflows/new" element={<WorkflowEditorPage />} />
<Route path="/workflows/edit/:id" element={<WorkflowEditorPage />} />
<Route path="/profile" element={<ProfilePage />} />
</Routes>
</AppLayout>
@@ -94,4 +99,4 @@ const App: React.FC = () => {
);
};
export default App;
export default App;