diff --git a/web/src/pages/wallet/index.tsx b/web/src/pages/wallet/index.tsx
index 31feed6a7..76fa833e5 100644
--- a/web/src/pages/wallet/index.tsx
+++ b/web/src/pages/wallet/index.tsx
@@ -1,6 +1,7 @@
import { useEffect, useMemo, useRef, useState, type ReactNode } from "react";
import { AlipayCircleFilled, WechatFilled } from "@ant-design/icons";
-import { App, Button, Grid, Input, Modal, QRCode, Skeleton, Table, Tag } from "antd";
+import { App, Button, Grid, Input, Modal, QRCode, Skeleton, Table } from "antd";
+import { StatusBadge } from "@/components/ui/base/badges/status-badge";
import { SegmentedControl } from "@/components/ui/base/segmented-control";
import type { ColumnsType } from "antd/es/table";
import { motion, useReducedMotion } from "motion/react";
@@ -612,26 +613,24 @@ function CreditDelta({ value }: { value: number }) {
function LedgerTypeTag({ type }: { type: CreditLedgerEntry["type"] }) {
const meta = ledgerTypeMeta(type);
- return (
-
- {meta.label}
-
- );
+ // 用项目 StatusBadge 而不是 antd Tag:Tag 的 default/error 配色在本项目主题下不可读。
+ return ;
}
function ledgerTypeMeta(type: CreditLedgerEntry["type"]) {
+ // tone 走 StatusBadge 的语义色,明暗主题都自适应;不再用 antd Tag 的 default 配色。
const values = {
- redeem: { label: "兑换充值", tagColor: "default", icon: , iconClass: "bg-foreground/8 text-foreground/70" },
- payment_topup: { label: "在线充值", tagColor: "success", icon: , iconClass: "bg-emerald-500/10 text-emerald-600 dark:text-emerald-300" },
- admin_grant: { label: "管理员充值", tagColor: "default", icon: , iconClass: "bg-foreground/8 text-foreground/70" },
- consume: { label: "模型消费", tagColor: "error", icon: , iconClass: "bg-rose-500/10 text-rose-600 dark:text-rose-300" },
- reserve: { label: "积分冻结", tagColor: "warning", icon: , iconClass: "bg-amber-500/10 text-amber-600 dark:text-amber-300" },
- refund: { label: "消费退款", tagColor: "warning", icon: , iconClass: "bg-amber-500/10 text-amber-600 dark:text-amber-300" },
- admin_adjustment: { label: "管理员调账", tagColor: "default", icon: , iconClass: "bg-foreground/8 text-foreground/70" },
- signup_bonus: { label: "注册奖励", tagColor: "default", icon: , iconClass: "bg-foreground/8 text-foreground/70" },
- checkin_bonus: { label: "签到奖励", tagColor: "default", icon: , iconClass: "bg-foreground/8 text-foreground/70" },
+ redeem: { label: "兑换充值", tone: "neutral", icon: , iconClass: "bg-foreground/8 text-foreground/70" },
+ payment_topup: { label: "在线充值", tone: "success", icon: , iconClass: "bg-emerald-500/10 text-emerald-600 dark:text-emerald-300" },
+ admin_grant: { label: "管理员充值", tone: "neutral", icon: , iconClass: "bg-foreground/8 text-foreground/70" },
+ consume: { label: "模型消费", tone: "error", icon: , iconClass: "bg-rose-500/10 text-rose-600 dark:text-rose-300" },
+ reserve: { label: "积分冻结", tone: "warning", icon: , iconClass: "bg-amber-500/10 text-amber-600 dark:text-amber-300" },
+ refund: { label: "消费退款", tone: "warning", icon: , iconClass: "bg-amber-500/10 text-amber-600 dark:text-amber-300" },
+ admin_adjustment: { label: "管理员调账", tone: "neutral", icon: , iconClass: "bg-foreground/8 text-foreground/70" },
+ signup_bonus: { label: "注册奖励", tone: "neutral", icon: , iconClass: "bg-foreground/8 text-foreground/70" },
+ checkin_bonus: { label: "签到奖励", tone: "neutral", icon: , iconClass: "bg-foreground/8 text-foreground/70" },
} as const;
- return values[type] || { label: "其他积分变动", tagColor: "default", icon: , iconClass: "bg-foreground/8 text-foreground/70" };
+ return values[type] || { label: "其他积分变动", tone: "neutral", icon: , iconClass: "bg-foreground/8 text-foreground/70" };
}
function ledgerTitle(entry: CreditLedgerEntry) {