支持板块图标与主题色自定义,并优化列表加载与未保存离开提示。

新增后端图标校验与色槽规范化,前端展示 BoardBadge/骨架屏,发帖与板块管理页增加未保存确认。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-28 17:13:32 +08:00
parent e038d4f9e9
commit 55c256654b
63 changed files with 1966 additions and 714 deletions

View File

@@ -1,3 +1,4 @@
import { Users, FileText, LayoutGrid } from 'lucide-react';
import { useNavigate } from 'react-router-dom';
import type { Board, ForumStats } from '../api/types';
@@ -24,13 +25,20 @@ export default function FeedHeader({ boardId, keyword, boards, stats, postTotal
<div className="feed-head__title">
<h2 title={boardHint || undefined}>{title}</h2>
{!keyword && stats && (
<span className="feed-head__meta">
<strong>{stats.users}</strong>
<span className="feed-head__dot" aria-hidden>·</span>
<strong>{stats.posts}</strong>
<span className="feed-head__dot" aria-hidden>·</span>
<strong>{stats.boards}</strong>
</span>
<div className="feed-head__stats">
<span className="feed-stat-chip">
<Users aria-hidden />
<strong>{stats.users}</strong>
</span>
<span className="feed-stat-chip">
<FileText aria-hidden />
<strong>{stats.posts}</strong>
</span>
<span className="feed-stat-chip">
<LayoutGrid aria-hidden />
<strong>{stats.boards}</strong>
</span>
</div>
)}
</div>
{keyword && (