前段

Change-Id: I718d4d07ea03c6d2b6bcbd4d426c5d1af2201bf4
diff --git a/src/components/Personal/Upload.jsx b/src/components/Personal/Upload.jsx
new file mode 100644
index 0000000..4d6e934
--- /dev/null
+++ b/src/components/Personal/Upload.jsx
@@ -0,0 +1,65 @@
+import React from 'react';

+import { useNavigate,useLocation } from 'react-router-dom';

+import './personalSubpage.css';

+

+const Upload = ({ onLogout }) => {

+  const navigate = useNavigate();

+  const location = useLocation();

+  const [uploads] = React.useState([

+    { id: 1, name: '星际穿越', status: '已发布', date: '2023-10-15', size: '15.2GB' },

+    { id: 2, name: '黑暗骑士', status: '审核中', date: '2023-10-18', size: '12.7GB' }

+  ]);

+

+  const handleBack = () => {

+    // 返回个人中心,并携带来源标记

+    navigate('/personal', { 

+      state: { 

+        fromSubpage: true,  // 标记来自子页面

+        dashboardTab: location.state?.dashboardTab // 保留Dashboard的标签页状态

+      },

+      replace: true  // 替换当前历史记录

+    });

+  };

+  return (

+    <div className="subpage-container">

+      <button className="back-button" onClick={(handleBack)}>

+        ← 返回个人中心

+      </button>

+

+      <h2 className="page-title">上传记录</h2>

+      

+      <table className="uploads-table">

+        <thead>

+          <tr>

+            <th>资源名称</th>

+            <th>大小</th>

+            <th>状态</th>

+            <th>上传时间</th>

+            <th>操作</th>

+          </tr>

+        </thead>

+        <tbody>

+          {uploads.map(item => (

+            <tr key={item.id} className="list-item">

+              <td>{item.name}</td>

+              <td>{item.size}</td>

+              <td>

+                <span className={`status-badge ${

+                  item.status === '已发布' ? 'published' : 'pending'

+                }`}>

+                  {item.status}

+                </span>

+              </td>

+              <td>{item.date}</td>

+              <td>

+                <button className="action-btn">详情</button>

+              </td>

+            </tr>

+          ))}

+        </tbody>

+      </table>

+    </div>

+  );

+};

+

+export default Upload;
\ No newline at end of file