refactor: 优化管理端配置页紧凑布局与时间展示

This commit is contained in:
2026-05-20 16:57:47 +08:00
parent 08a11a1589
commit 6ecbaf5fb4
13 changed files with 93 additions and 97 deletions

View File

@@ -407,7 +407,11 @@ export function OddsConfigDocScreen() {
key={t.id}
type="button"
variant={catTab === t.id ? "default" : "outline"}
className={cn(catTab === t.id && "shadow-sm")}
size="xs"
className={cn(
"h-7 rounded-full px-3 text-xs font-medium",
catTab === t.id ? "shadow-sm" : "bg-white text-slate-900",
)}
onClick={() => setCatTab(t.id)}
>
{t.label}
@@ -427,7 +431,7 @@ export function OddsConfigDocScreen() {
type="button"
variant={resolvedPlayCode === t.play_code ? "secondary" : "outline"}
className={cn(
"h-9 border-slate-300 px-5 text-[18px] font-medium",
"h-8 rounded-full border-slate-300 px-4 text-sm font-medium",
resolvedPlayCode === t.play_code
? "border-slate-950 bg-slate-950 text-white shadow-sm hover:bg-slate-900"
: "bg-white text-slate-900 hover:border-slate-400 hover:bg-slate-50",
@@ -470,20 +474,25 @@ export function OddsConfigDocScreen() {
</div>
{detail ? (
<p className="text-sm text-muted-foreground">
{t("odds.activeVersionPrefix", { ns: "config" })}
{activeHead ? (
<>
v{activeHead.version_no}
{activeHead.effective_at ? ` · ${formatDt(activeHead.effective_at)}` : ""}
</>
) : (
"—"
)}
{!isDraft ? (
<span className="text-amber-600 dark:text-amber-400"> - {t("odds.readOnlyHint", { ns: "config" })}</span>
) : null}
</p>
<div className="space-y-1 text-sm">
<p className="text-muted-foreground">
{t("odds.activeVersionPrefix", { ns: "config" })}
{activeHead ? (
<>
v{activeHead.version_no}
{activeHead.effective_at ? ` · ${formatDt(activeHead.effective_at)}` : ""}
</>
) : (
"—"
)}
{!isDraft ? (
<span className="text-amber-600 dark:text-amber-400">
{" "}
- {t("odds.readOnlyHint", { ns: "config" })}
</span>
) : null}
</p>
</div>
) : null}
{error ? <p className="text-sm text-destructive">{error}</p> : null}