fix: 修复TypeScript配置错误并更新项目文档
详细说明: - 修复了@n8n/config包的TypeScript配置错误 - 移除了不存在的jest-expect-message类型引用 - 清理了所有TypeScript构建缓存 - 更新了可行性分析文档,添加了技术实施方案 - 更新了Agent prompt文档 - 添加了会展策划工作流文档 - 包含了n8n-chinese-translation子项目 - 添加了exhibition-demo展示系统框架
This commit is contained in:
72
web_frontend/exhibition-demo/src/App.tsx
Normal file
72
web_frontend/exhibition-demo/src/App.tsx
Normal file
@@ -0,0 +1,72 @@
|
||||
import React, { useState } from 'react';
|
||||
import { AnimatePresence, motion } from 'framer-motion';
|
||||
import LandingPage from './pages/LandingPage';
|
||||
import WorkflowPage from './pages/WorkflowPage';
|
||||
import ResultPage from './pages/ResultPage';
|
||||
import { useDemoStore } from './store/demoStore';
|
||||
|
||||
type PageType = 'landing' | 'workflow' | 'result';
|
||||
|
||||
function App() {
|
||||
const [currentPage, setCurrentPage] = useState<PageType>('landing');
|
||||
const { status } = useDemoStore();
|
||||
|
||||
React.useEffect(() => {
|
||||
if (status === 'completed') {
|
||||
setCurrentPage('result');
|
||||
}
|
||||
}, [status]);
|
||||
|
||||
const handleStartDemo = () => {
|
||||
setCurrentPage('workflow');
|
||||
};
|
||||
|
||||
const handleRestart = () => {
|
||||
useDemoStore.getState().reset();
|
||||
setCurrentPage('landing');
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-gradient-to-br from-neutral-50 to-neutral-100 dark:from-neutral-950 dark:to-neutral-900">
|
||||
<AnimatePresence mode="wait">
|
||||
{currentPage === 'landing' && (
|
||||
<motion.div
|
||||
key="landing"
|
||||
initial={{ opacity: 0 }}
|
||||
animate={{ opacity: 1 }}
|
||||
exit={{ opacity: 0 }}
|
||||
transition={{ duration: 0.5 }}
|
||||
>
|
||||
<LandingPage onStart={handleStartDemo} />
|
||||
</motion.div>
|
||||
)}
|
||||
|
||||
{currentPage === 'workflow' && (
|
||||
<motion.div
|
||||
key="workflow"
|
||||
initial={{ opacity: 0 }}
|
||||
animate={{ opacity: 1 }}
|
||||
exit={{ opacity: 0 }}
|
||||
transition={{ duration: 0.5 }}
|
||||
>
|
||||
<WorkflowPage />
|
||||
</motion.div>
|
||||
)}
|
||||
|
||||
{currentPage === 'result' && (
|
||||
<motion.div
|
||||
key="result"
|
||||
initial={{ opacity: 0 }}
|
||||
animate={{ opacity: 1 }}
|
||||
exit={{ opacity: 0 }}
|
||||
transition={{ duration: 0.5 }}
|
||||
>
|
||||
<ResultPage onRestart={handleRestart} />
|
||||
</motion.div>
|
||||
)}
|
||||
</AnimatePresence>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
Reference in New Issue
Block a user