新增论坛页面
Change-Id: I317789b03458b6e8109dd7aa3ac8c1eadcb38e62
diff --git a/front/src/App.js b/front/src/App.js
index 225689e..52f3a83 100644
--- a/front/src/App.js
+++ b/front/src/App.js
@@ -8,6 +8,7 @@
import SportsMartialArtsIcon from "@mui/icons-material/SportsMartialArts";
import PersonIcon from "@mui/icons-material/Person";
import AccountCircleIcon from "@mui/icons-material/AccountCircle";
+import ForumIcon from "@mui/icons-material/Forum";
import "./App.css";
import MoviePage from "./MoviePage";
import TVPage from "./TVPage";
@@ -19,9 +20,12 @@
import UserProfile from "./UserProfile";
import PublishPage from "./PublishPage";
import TorrentDetailPage from './TorrentDetailPage';
+import ForumPage from "./ForumPage";
+import PostDetailPage from "./PostDetailPage";
import LoginPage from './LoginPage';
import RegisterPage from './RegisterPage';
+
const navItems = [
{ label: "电影", icon: <MovieIcon />, path: "/movie" },
{ label: "剧集", icon: <EmailIcon />, path: "/tv" },
@@ -30,7 +34,8 @@
{ label: "游戏", icon: <SportsEsportsIcon />, path: "/game" },
{ label: "体育", icon: <SportsMartialArtsIcon />, path: "/sport" },
{ label: "资料", icon: <PersonIcon />, path: "/info" },
- { label: "发布", icon: <AccountCircleIcon />, path: "/publish" }, // Added Publish option
+ { label: "论坛", icon: <ForumIcon />, path: "/forum" },
+ { label: "发布", icon: <AccountCircleIcon />, path: "/publish" },
];
function Home() {
@@ -52,7 +57,6 @@
<span style={{ color: '#1976d2', fontWeight: 500 }}>下载量: <b>50GB</b></span>
</div>
</div>
- {/* 下方内容整体下移,留出与电影界面一致的间距 */}
<div style={{ height: 32 }} />
<nav className="nav-bar card">
{navItems.map((item) => (
@@ -72,7 +76,6 @@
<span role="img" aria-label="search">🔍</span>
</button>
</div>
- {/* 删除高频搜索栏 */}
<div className="table-section card">
<table className="movie-table">
<thead>
@@ -153,6 +156,8 @@
<Route path="/anime" element={<AnimePage />} />
<Route path="/game" element={<GamePage />} />
<Route path="/sport" element={<SportPage />} />
+ <Route path="/forum" element={<ForumPage />} />
+ <Route path="/forum/:postId" element={<PostDetailPage />} />
<Route path="/info" element={<InfoPage />} />
<Route path="/user" element={<UserProfile />} />
<Route path="/publish" element={<PublishPage />} />