From 406ebb7671400398d057b442725375741cb26c4d Mon Sep 17 00:00:00 2001 From: kang Date: Wed, 15 Jul 2026 13:40:19 +0800 Subject: [PATCH] =?UTF-8?q?feat(hall):=20=E6=94=AF=E6=8C=81=E5=85=A8?= =?UTF-8?q?=E4=BF=9D=E9=87=91=E9=A2=9D=E6=95=B4=E9=99=A4=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E4=B8=8E=E8=A7=84=E5=88=99=E6=8F=90=E7=A4=BA=EF=BC=8C=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E6=A1=8C=E9=9D=A2=E7=AB=AF=E8=BD=AC=E8=B4=A6=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 + src/features/hall/hall-bet-rules.ts | 6 +- src/features/hall/hall-betting-grid.tsx | 57 +++- src/features/hall/hall-wallet-strip.tsx | 38 ++- src/features/hall/selection-type.ts | 12 +- src/features/player/entry-gate.tsx | 61 +++- src/features/player/player-entry-desktop.tsx | 260 ++++++++++++++++++ .../results/draw-results-list-screen.tsx | 36 +-- src/features/wallet/wallet-logs-block.tsx | 43 +-- src/features/wallet/wallet-screen.tsx | 8 +- .../wallet/wallet-transfer-dialogs.tsx | 34 ++- src/i18n/locales/en/player.json | 9 +- src/i18n/locales/ne/player.json | 9 +- src/i18n/locales/zh/player.json | 9 +- 14 files changed, 510 insertions(+), 74 deletions(-) create mode 100644 src/features/player/player-entry-desktop.tsx diff --git a/.gitignore b/.gitignore index fc6edee..6d820e3 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,8 @@ # testing /coverage +/.playwright-cli/ +/output/ # next.js /.next/ diff --git a/src/features/hall/hall-bet-rules.ts b/src/features/hall/hall-bet-rules.ts index a5e991f..a6087e4 100644 --- a/src/features/hall/hall-bet-rules.ts +++ b/src/features/hall/hall-bet-rules.ts @@ -56,7 +56,11 @@ export function isValidRollNumber(value: string): boolean { ); } -export type DraftLineIssueReason = "invalid_number_length" | "roll_requires_r" | "missing_digit_slot"; +export type DraftLineIssueReason = + | "invalid_number_length" + | "roll_requires_r" + | "missing_digit_slot" + | "full_cover_amount_not_divisible"; /** * 某玩法列已填金额但无法组成合法注单行时返回原因;合法则返回 null。 diff --git a/src/features/hall/hall-betting-grid.tsx b/src/features/hall/hall-betting-grid.tsx index 820c444..6c0d41f 100644 --- a/src/features/hall/hall-betting-grid.tsx +++ b/src/features/hall/hall-betting-grid.tsx @@ -1,9 +1,10 @@ "use client"; -import { ChevronDown, ChevronUp, Lock, Ticket, Trash2, Star } from "lucide-react"; +import { ChevronDown, ChevronUp, CircleHelp, Lock, Ticket, Trash2, Star } from "lucide-react"; import { useCallback, useEffect, useMemo, useRef, useState, memo } from "react"; import { useTranslation } from "react-i18next"; import { toast } from "sonner"; +import { Tooltip } from "@base-ui/react/tooltip"; import { getBetProviders } from "@/api/bet-providers"; import { getPlayEffective } from "@/api/play"; @@ -34,6 +35,7 @@ import { type DraftLineIssueReason, } from "@/features/hall/hall-bet-rules"; import { + isFullCoverAmountDivisible, isHighCostSelectionType, resolveSelectionTotalBet, selectionCombinationCount, @@ -1111,6 +1113,18 @@ export function HallBettingGrid({ drawLive }: { drawLive: HallDrawLiveSnapshot } playCode: column.play.play_code, reason, }); + return; + } + const comboCount = selectionCombinationCount(row.number, row.selectionType); + if ( + row.selectionType === "full_cover" + && !isFullCoverAmountDivisible(amount, comboCount) + ) { + issues.push({ + rowNo: rowIndex + 1, + playCode: column.play.play_code, + reason: "full_cover_amount_not_divisible", + }); } }); }); @@ -2257,7 +2271,7 @@ export function HallBettingGrid({ drawLive }: { drawLive: HallDrawLiveSnapshot } ) : null} ) : null} - +