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

@@ -84,6 +84,9 @@ export default function AdsBuyClient() {
const selectedPay: AdPaymentOption | undefined = cfg?.payments.find((p) => p.id === paymentID);
const selectedDuration = cfg?.durations.find((d) => d.days === days);
const selectedPrice = selectedDuration
? (kind === "text" ? selectedDuration.price_hint_text : selectedDuration.price_hint).trim()
: "";
const canSubmit = !!cfg && cfg.payments.length > 0 && !busy;
const kindLabel = kind === "image" ? "图片广告" : "文字广告";
@@ -224,6 +227,7 @@ export default function AdsBuyClient() {
<p className="text-[12.5px]">
{kindLabel}
{selectedDuration ? ` · ${selectedDuration.label}` : ""}
{selectedPrice ? ` · ${selectedPrice}` : ""}
</p>
</div>
@@ -331,9 +335,17 @@ export default function AdsBuyClient() {
<div className="grid grid-cols-5 gap-2">
{cfg.durations.map((d) => {
const active = days === d.days;
const price = (kind === "text" ? d.price_hint_text : d.price_hint).trim();
return (
<ChipTab key={d.days} active={active} onClick={() => setDays(d.days)} compact>
{d.label.replace(/\s/g, "")}
<ChipTab
key={d.days}
active={active}
onClick={() => setDays(d.days)}
compact
priced={!!price}
>
<span>{d.label.replace(/\s/g, "")}</span>
{price ? <span className="j13-ads-chip-price">{price}</span> : null}
</ChipTab>
);
})}
@@ -455,17 +467,21 @@ function ChipTab({
onClick,
children,
compact,
priced,
}: {
active: boolean;
onClick: () => void;
children: React.ReactNode;
compact?: boolean;
priced?: boolean;
}) {
return (
<button
type="button"
onClick={onClick}
className={`j13-ads-chip${active ? " is-on" : ""}${compact ? " is-compact" : ""}`}
className={`j13-ads-chip${active ? " is-on" : ""}${compact ? " is-compact" : ""}${
priced ? " is-priced" : ""
}`}
>
{children}
</button>