feat: 站点媒体库与移动端底部导航,服务测试补强

- 新增媒体库:media_library/media_thumbs 服务(WebP 缩略图)、管理端 media 页面
- 移动端底部导航 MobileTabBar 替换 MobilePostBar
- 旧数据导入增强与测试、路由与登录会话/板块侧边栏测试补强
- site-doc 组件精简(移除 Breadcrumb),文档新增迁移公告说明
This commit is contained in:
2026-09-27 02:35:38 +08:00
parent 734afbc39f
commit 1d862a0dd3
61 changed files with 4757 additions and 1129 deletions

View File

@@ -201,31 +201,46 @@ export default function NotificationBell({ initialUnread = 0 }: { initialUnread?
</button>
{open && (
<div
className="absolute right-0 mt-2.5 w-[340px] max-w-[calc(100vw-2rem)] overflow-hidden z-50 j13-toast-in"
style={{
background: "var(--panel)",
border: "1px solid var(--line)",
borderRadius: "var(--r)",
boxShadow: "var(--shadow-lg)",
}}
>
<>
{/* 移动端遮罩:点击关闭(桌面不渲染) */}
<div
className="flex items-center justify-between px-5 py-3.5"
style={{ borderBottom: "1px solid var(--line)" }}
className="lg:hidden fixed inset-0 z-40"
style={{ background: "rgba(0,0,0,0.35)" }}
onClick={() => setOpen(false)}
aria-hidden="true"
/>
<div
className="absolute right-0 mt-2.5 w-[340px] max-w-[calc(100vw-2rem)] overflow-hidden z-50 j13-toast-in flex flex-col
max-lg:fixed max-lg:inset-x-0 max-lg:bottom-0 max-lg:top-auto max-lg:mt-0 max-lg:w-full max-lg:max-w-none max-lg:max-h-[75dvh] max-lg:rounded-t-2xl!"
style={{
background: "var(--panel)",
border: "1px solid var(--line)",
borderRadius: "var(--r)",
boxShadow: "var(--shadow-lg)",
}}
>
<span className="font-semibold text-[15px]" style={{ color: "var(--ink)" }}>通知</span>
{unread > 0 && (
<button
onClick={handleMarkAllRead}
className="flex items-center gap-1 text-xs meta hover:text-[var(--accent)] transition-colors"
>
<CheckCheck size={13} /> 全部已读
</button>
)}
</div>
{/* 移动端底部面板抓手 */}
<div
className="lg:hidden mx-auto mt-2 mb-[-6px] w-10 h-1 rounded-full shrink-0"
style={{ background: "var(--line-2)" }}
aria-hidden="true"
/>
<div
className="flex items-center justify-between px-5 py-3.5 shrink-0"
style={{ borderBottom: "1px solid var(--line)" }}
>
<span className="font-semibold text-[15px]" style={{ color: "var(--ink)" }}>通知</span>
{unread > 0 && (
<button
onClick={handleMarkAllRead}
className="flex items-center gap-1 text-xs meta hover:text-[var(--accent)] transition-colors"
>
<CheckCheck size={13} /> 全部已读
</button>
)}
</div>
<div className="max-h-[24rem] overflow-y-auto">
<div className="flex-1 min-h-0 max-h-[24rem] max-lg:max-h-none overflow-y-auto">
{loading ? (
<p className="text-center py-10 meta">加载中...</p>
) : notifications.length === 0 ? (
@@ -303,7 +318,7 @@ export default function NotificationBell({ initialUnread = 0 }: { initialUnread?
</div>
<div
className="px-4 py-2.5 text-center"
className="px-4 py-2.5 text-center shrink-0"
style={{ borderTop: "1px solid var(--line)" }}
>
<Link
@@ -314,7 +329,8 @@ export default function NotificationBell({ initialUnread = 0 }: { initialUnread?
查看全部通知 →
</Link>
</div>
</div>
</div>
</>
)}
</div>
);