diff --git a/src/pages/HomePage.tsx b/src/pages/HomePage.tsx index 722f27c..7b30ebd 100644 --- a/src/pages/HomePage.tsx +++ b/src/pages/HomePage.tsx @@ -1,14 +1,8 @@ -import React, { useState } from 'react' +import React from 'react' import { Link } from 'react-router-dom' -import { Plus, FolderOpen, Video, Music, Zap, TestTube, Sparkles, Database } from 'lucide-react' -import { TauriService } from '../services/tauri' -import { useProjectStore } from '../stores/useProjectStore' +import { Plus, FolderOpen, Video, Music, Zap, Sparkles, Database } from 'lucide-react' const HomePage: React.FC = () => { - const [testResult, setTestResult] = useState('') - const [isTestingConnection, setIsTestingConnection] = useState(false) - const { createProject } = useProjectStore() - const recentProjects = [ { id: 1, name: '旅行视频剪辑', lastModified: '2 小时前', thumbnail: '/placeholder-video.jpg' }, { id: 2, name: '产品宣传片', lastModified: '1 天前', thumbnail: '/placeholder-video.jpg' }, @@ -16,7 +10,6 @@ const HomePage: React.FC = () => { ] const quickActions = [ - { icon: Video, label: '新建视频项目', description: '创建一个新的视频编辑项目', path: '/editor' }, { icon: Sparkles, label: 'AI 视频生成', description: '使用 AI 将图片转换为动态视频', path: '/ai-video' }, { icon: Music, label: '音频处理', description: '处理音频文件,添加效果', path: '/audio' }, { icon: Zap, label: 'AI 自动剪辑', description: '使用 AI 自动生成视频剪辑', path: '/editor' }, @@ -24,27 +17,6 @@ const HomePage: React.FC = () => { { icon: Database, label: 'KV 存储测试', description: '测试 Cloudflare KV 键值存储功能', path: '/kv-test' }, ] - const testTauriConnection = async () => { - setIsTestingConnection(true) - setTestResult('') - - try { - const result = await TauriService.greet('MixVideo V2') - setTestResult(`✅ 连接成功: ${result}`) - } catch (error) { - setTestResult(`❌ 连接失败: ${error instanceof Error ? error.message : '未知错误'}`) - } finally { - setIsTestingConnection(false) - } - } - - const handleCreateProject = async () => { - try { - await createProject('新项目', '使用 MixVideo V2 创建的项目') - } catch (error) { - console.error('Failed to create project:', error) - } - } return (
@@ -58,26 +30,13 @@ const HomePage: React.FC = () => {

开始新项目 - -
- - {testResult && ( -
- {testResult} -
- )}
{/* Quick Actions */}