feat(config): 重构配置中心导航与版本展示,支持全量版本加载

This commit is contained in:
2026-05-16 10:28:00 +08:00
parent 8bd7cc3d73
commit 1578c7e214
15 changed files with 375 additions and 471 deletions

View File

@@ -6,6 +6,7 @@ import { toast } from "sonner";
import {
deleteOddsVersion,
getAdminPlayTypes,
getAllConfigVersions,
getOddsVersion,
getOddsVersions,
postOddsVersion,
@@ -72,7 +73,7 @@ export function RebateConfigDocScreen() {
const refreshList = useCallback(async () => {
try {
const d = await getOddsVersions({ per_page: 50 });
const d = await getAllConfigVersions(getOddsVersions);
setListRows(d.items);
} catch (e) {
toast.error(e instanceof LotteryApiBizError ? e.message : "加载版本失败");
@@ -345,7 +346,7 @@ export function RebateConfigDocScreen() {
<Label htmlFor="win-enjoy" className="font-medium leading-snug">
</Label>
<p className="text-xs text-muted-foreground">
<p className="text-sm text-muted-foreground">
/
</p>
</div>
@@ -353,7 +354,7 @@ export function RebateConfigDocScreen() {
<div className="grid gap-1 text-sm">
<span className="text-muted-foreground">线</span>
<span className="font-mono text-xs">
<span className="font-mono text-sm">
{activeHead?.effective_at ? formatDt(activeHead.effective_at) : "—"}
</span>
</div>