feat: 优化多语言文案接入并升级大厅与钱包交互体验

- 补充大厅下注结果、快速填单、查中奖、分页与通用操作多语言文案
- 移除多处界面默认文案回退,统一改用 i18n 配置输出
- 优化大厅快速填单、开奖结果入口与注单筛选区域视觉交互
- 重构钱包转入转出弹窗与流水卡片样式,增强金额与状态信息展示
This commit is contained in:
2026-05-20 17:56:18 +08:00
parent a2a29107f8
commit 626914feb6
20 changed files with 578 additions and 359 deletions

View File

@@ -47,7 +47,7 @@ export function HallBetResultDialog({
type="button"
onClick={() => onOpenChange(false)}
className="absolute right-3 top-3 inline-flex size-9 items-center justify-center rounded-full text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-700"
aria-label={t("actions.close", { defaultValue: "关闭" })}
aria-label={t("actions.close")}
>
<XIcon className="size-5" />
</button>
@@ -56,11 +56,11 @@ export function HallBetResultDialog({
</div>
<DialogHeader className="mt-4 items-center gap-2">
<DialogTitle className="text-2xl font-black text-slate-950">
{t("hall.result.title", { defaultValue: "下注结果" })}
{t("hall.result.title")}
</DialogTitle>
{data ? (
<DialogDescription className="text-sm leading-relaxed text-slate-500">
{t("hall.result.draw", { defaultValue: "期号" })}{" "}
{t("hall.result.draw")}{" "}
<span className="font-mono font-black text-[#e5002c]">{data.draw.draw_id}</span>
</DialogDescription>
) : null}
@@ -73,20 +73,20 @@ export function HallBetResultDialog({
<div className="space-y-4 py-4">
{!data ? (
<p className="text-sm text-slate-500">
{t("hall.result.empty", { defaultValue: "暂无结果。" })}
{t("hall.result.empty")}
</p>
) : (
<>
<div className="grid grid-cols-2 gap-3">
<div className="rounded-lg border border-emerald-100 bg-emerald-50 px-3 py-4 text-center">
<p className="text-sm font-bold text-emerald-700">
{t("hall.result.successCount", { defaultValue: "成功注项" })}
{t("hall.result.successCount")}
</p>
<p className="mt-2 text-4xl font-black tabular-nums text-emerald-600">{totalSuccess}</p>
</div>
<div className="rounded-lg border border-rose-100 bg-rose-50 px-3 py-4 text-center">
<p className="text-sm font-bold text-rose-600">
{t("hall.result.failureCount", { defaultValue: "失败注项" })}
{t("hall.result.failureCount")}
</p>
<p className="mt-2 text-4xl font-black tabular-nums text-[#e5002c]">{totalFailure}</p>
</div>
@@ -98,7 +98,7 @@ export function HallBetResultDialog({
<ClipboardList className="size-5" />
</span>
<span className="truncate text-sm font-black text-[#0b3f96]">
{t("hall.result.actual", { defaultValue: "实扣金额" })}
{t("hall.result.actual")}
</span>
</div>
<span className="shrink-0 font-mono text-base font-black tabular-nums text-[#0b3f96]">
@@ -108,11 +108,11 @@ export function HallBetResultDialog({
<div className="grid gap-2 rounded-lg border border-[#e8eef7] bg-white px-4 py-3 text-xs text-slate-600 sm:grid-cols-2">
<p>
{t("hall.result.orderNo", { defaultValue: "订单号" })}:{" "}
{t("hall.result.orderNo")}:{" "}
<span className="font-mono font-black text-[#0b3f96]">{data.order_no}</span>
</p>
<p>
{t("hall.result.balanceAfter", { defaultValue: "剩余余额" })}:{" "}
{t("hall.result.balanceAfter")}:{" "}
<span className="font-semibold text-slate-950">
{formatMinorAsCurrency(data.balance_after, currencyCode)}
</span>
@@ -121,9 +121,7 @@ export function HallBetResultDialog({
<div className="space-y-2">
<p className="text-sm font-black text-[#e5002c]">
{t("hall.result.items", {
defaultValue: "成功注项明细",
})}
{t("hall.result.items")}
</p>
<div className="overflow-x-auto rounded-xl border border-[#dfe8f6]">
<table className="min-w-[430px] w-full border-collapse text-xs">
@@ -131,13 +129,13 @@ export function HallBetResultDialog({
<tr>
<th className="w-10 border-r border-[#dfe8f6] px-2 py-2.5 text-center font-black">No.</th>
<th className="border-r border-[#dfe8f6] px-2 py-2.5 text-center font-black">
{t("hall.result.number", { defaultValue: "号码" })}
{t("hall.result.number")}
</th>
<th className="border-r border-[#dfe8f6] px-2 py-2.5 text-center font-black">
{t("orders.play", { defaultValue: "玩法" })}
{t("orders.play")}
</th>
<th className="px-2 py-2.5 text-center font-black">
{t("hall.result.actualDeduct", { defaultValue: "实扣" })}
{t("hall.result.actualDeduct")}
</th>
</tr>
</thead>
@@ -171,12 +169,12 @@ export function HallBetResultDialog({
</div>
{totalFailure === 0 ? (
<div className="rounded-lg border border-emerald-100 bg-emerald-50 px-3 py-3 text-sm font-semibold text-emerald-700">
{t("hall.result.noFailures", { defaultValue: "本次提交没有失败注项。" })}
{t("hall.result.noFailures")}
</div>
) : (
<div className="space-y-2 rounded-lg border border-rose-100 bg-rose-50 px-3 py-3">
<p className="text-sm font-black text-[#e5002c]">
{t("hall.result.failedItems", { defaultValue: "失败注项明细" })}
{t("hall.result.failedItems")}
</p>
{failedItems.map((item, index) => (
<div
@@ -188,7 +186,7 @@ export function HallBetResultDialog({
{playLabel(item.play_code, t)}
</span>
<span className="shrink-0 font-bold text-[#e5002c]">
{item.fail_reason_text ?? item.fail_reason_code ?? t("hall.result.failed", { defaultValue: "失败" })}
{item.fail_reason_text ?? item.fail_reason_code ?? t("hall.result.failed")}
</span>
</div>
))}
@@ -208,7 +206,7 @@ export function HallBetResultDialog({
render={<Link href="/orders" />}
>
<ClipboardList className="size-5" />
{t("hall.result.viewBets", { defaultValue: "查看注单" })}
{t("hall.result.viewBets")}
</Button>
<Button
type="button"
@@ -216,7 +214,7 @@ export function HallBetResultDialog({
className="h-12 rounded-lg border-0 bg-[#07459f] text-base font-black text-white shadow-[0_10px_24px_rgba(7,69,159,0.24)] hover:bg-[#063b88]"
>
<Ticket className="size-5" />
{t("hall.result.continueBetting", { defaultValue: "继续下注" })}
{t("hall.result.continueBetting")}
</Button>
</div>
</DialogContent>