fix: replies drawer auto-expand, settings no-scroll, title bug, admin links

- PostDetail: replies open as drawer (grid-rows animation) automatically
  after post loads — no toggle button
- SettingsPage: outer frame overflow hidden (100vh), only inner panel
  scrolls; hide #app layout when not on feed (fixes navbar moving when
  scrolling settings)
- Title: metadata 'Loading...' → 'Forumlify' (Next resets <title> to
  metadata on re-render → title became Loading... after load); unify
  title effect (rotate Loading. only while !ready && !forumNameLoaded)
- AdminLinks: link divider uses var(--border) (was #f1f5f9, invisible
  in dark mode); add admin.link i18n keys
- AdminPage i18n nav labels
This commit is contained in:
lezi-fun committed 2026-08-11 17:35:48 +08:00
1 parent ad89aa3e04
commit 5a9a454ef3
9 files changed
+76 -20

No files matched your search

+17 -1
View File
@@ -28,6 +28,15 @@ export default function PostDetail({ postId, initialPost = null }) {
const [editImages, setEditImages] = useState([]);
const [editUploading, setEditUploading] = useState(false);
const editImageInputRef = useRef(null);
// 评论抽屉:帖子加载完成后自动展开(动画完整播放)
const [repliesOpen, setRepliesOpen] = useState(false);
useEffect(() => {
if (post && !repliesOpen) {
// 延迟到帖子内容渲染后,让抽屉动画平滑播放
const t = setTimeout(() => setRepliesOpen(true), 60);
return () => clearTimeout(t);
}
}, [post]);
const load = useCallback(async () => {
setError(null);
@@ -183,7 +192,14 @@ export default function PostDetail({ postId, initialPost = null }) {
<div className="post-detail-signature" style={{ marginTop: 16, paddingTop: 12, borderTop: '1px solid var(--border-light)', fontSize: 12, color: 'var(--text-secondary)' }} dangerouslySetInnerHTML={{ __html: renderedSignature }} />
)}
</div>
<ReplyList postId={postId} onRefresh={load} />
<div style={{ maxWidth: 700, margin: '0 auto', width: '100%', marginTop: 16 }}>
{/* 评论抽屉:帖子加载完成后自动展开 */}
<div className={'replies-drawer' + (repliesOpen ? ' open' : '')}>
<div className="replies-drawer-inner">
<ReplyList postId={postId} onRefresh={load} />
</div>
</div>
</div>
</div>
</div>