feat(torrents): 优化种子页面功能和交互
- 调整 torrents API 调用,增加更多接口支持
- 优化种子列表展示和操作,支持下载和查看详情
- 新增种子详情页面路由和组件
- 改进上传种子功能,增加表单验证和错误提示
- 优化用户信息展示
Change-Id: I9343f2f446639733ee5800a86bab85a4ac6d1a72
diff --git a/src/features/home/pages/HomePage.jsx b/src/features/home/pages/HomePage.jsx
index 27e1628..c3ac8d6 100644
--- a/src/features/home/pages/HomePage.jsx
+++ b/src/features/home/pages/HomePage.jsx
@@ -1,17 +1,21 @@
import React from 'react';
import { Button, Divider, List, Typography, Space, Tag } from 'antd';
import { CloudDownloadOutlined } from '@ant-design/icons';
+import { useNavigate } from 'react-router-dom';
const { Title, Paragraph, Text } = Typography;
-const HomePage = () => (
+const HomePage = () => {
+ const navigate = useNavigate();
+
+ return (
<div className="space-y-6">
<div className="text-center py-8">
<Title level={1}>欢迎来到 PT 网站</Title>
<Paragraph className="text-lg text-slate-500">
高清资源分享,互助共赢的PT资源社区
</Paragraph>
- <Button type="primary" size="large" icon={<CloudDownloadOutlined />}>
+ <Button type="primary" size="large" icon={<CloudDownloadOutlined />} onClick={() => navigate('/torrents')}>
浏览资源
</Button>
</div>
@@ -22,19 +26,7 @@
itemLayout="horizontal"
dataSource={[
{
- title: '网站升级通知',
- date: '2023-06-15',
- content: '网站将于本周六进行系统升级,届时将暂停服务4小时。'
- },
- {
- title: '新规则发布',
- date: '2023-06-10',
- content: '关于发布资源的新规则已经生效,请会员查看详情。'
- },
- {
- title: '新用户注册开放',
- date: '2023-06-01',
- content: '本站现已开放新用户注册,每天限额100名。'
+ content: '暂无公告',
}
]}
renderItem={(item) => (
@@ -47,6 +39,7 @@
)}
/>
</div>
-);
+ )
+};
export default HomePage;
\ No newline at end of file