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

+1 -1
View File
@@ -34,7 +34,7 @@ function HomeInner() {
<div className="app-fade-in">
<Navbar onOpenModal={openModal} />
<ChatManager />
<div id="app" style={{ display: view === 'feed' ? 'flex' : 'none' }}>
<div id="app" style={{ display: view === 'feed' ? undefined : 'none' }}>
<Sidebar />
<Feed onOpenModal={openModal} onReport={openReport} />
</div>
+37
View File
@@ -3015,3 +3015,40 @@ a.btn-secondary {
@keyframes spin {
to { transform: rotate(360deg); }
}
/* ===== 评论抽屉(平滑展开/收起) ===== */
.replies-drawer {
display: grid;
grid-template-rows: 0fr;
transition: grid-template-rows 0.45s cubic-bezier(0.22, 1, 0.36, 1);
overflow: hidden;
}
.replies-drawer.open {
grid-template-rows: 1fr;
}
.replies-drawer > .replies-drawer-inner {
overflow: hidden;
min-height: 0;
}
.replies-toggle {
display: inline-flex;
align-items: center;
gap: 6px;
background: none;
border: none;
color: var(--primary);
font-size: 14px;
cursor: pointer;
padding: 6px 10px;
border-radius: 6px;
transition: background 0.2s;
}
.replies-toggle:hover {
background: var(--primary-bg);
}
.replies-toggle .chev {
transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.replies-toggle.open .chev {
transform: rotate(180deg);
}
+4 -2
View File
@@ -5,8 +5,10 @@ import { ToastProvider } from '@/components/Toast';
import I18nInit from '@/components/I18nInit';
export const metadata = {
// 初始标题由客户端 AppProvider 接管(加载时轮换 Loading.,完成后显示论坛名)
title: 'Loading...',
// 初始标题用默认论坛名(AppProvider 加载期轮换 Loading.,完成后覆盖为真实名)。
// 注意:不能设 'Loading...' —— Next.js 客户端重渲染会重置 <title> 为 metadata 值,
// 导致加载完成后标题又变回 "Loading..."。
title: 'Forumlify',
description: 'Forumlify - 简洁优雅的现代社区系统',
};