feat: 前端 Error Boundary + 体验改进
- 新增 ErrorBoundary 组件: 捕获组件崩溃,显示友好错误页+重试按钮 - App: 用 ErrorBoundary 包裹,标题改为「先知 Profeto」 - Matches 页面: - 预测模式切换 (单次/多 Agent) - 加载中动画指示 - 预测中状态提示 - 错误提示可关闭
This commit is contained in:
+12
-9
@@ -1,15 +1,18 @@
|
||||
import { ErrorBoundary } from './components/ErrorBoundary'
|
||||
import Matches from './pages/Matches'
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
<div className="min-h-screen bg-gray-50">
|
||||
<header className="bg-white border-b px-6 py-3 flex items-center justify-between">
|
||||
<h1 className="text-xl font-bold text-blue-700">⚽ Profeto</h1>
|
||||
<span className="text-sm text-gray-500">足球 LLM 预测服务</span>
|
||||
</header>
|
||||
<main className="max-w-5xl mx-auto p-6">
|
||||
<Matches />
|
||||
</main>
|
||||
</div>
|
||||
<ErrorBoundary>
|
||||
<div className="min-h-screen bg-gray-50">
|
||||
<header className="bg-white border-b px-6 py-3 flex items-center justify-between">
|
||||
<h1 className="text-xl font-bold text-blue-700">⚽ 先知 Profeto</h1>
|
||||
<span className="text-sm text-gray-500">足球 LLM 预测服务</span>
|
||||
</header>
|
||||
<main className="max-w-5xl mx-auto p-6">
|
||||
<Matches />
|
||||
</main>
|
||||
</div>
|
||||
</ErrorBoundary>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user