feat: enhance API error handling and UI improvements
Some checks failed
lotteryfront CI / build (push) Has been cancelled

- Updated `getPublicCurrencies` and `getPlayerAuthCaptcha` functions to include `skipGlobalServerError` option, improving error handling for API requests.
- Refactored the NotFoundPage component to enhance mobile responsiveness and UI consistency, integrating `PlayerMobileViewport`.
- Improved the NetworkStatusBanner and OfflineBanner components by adding player banner height reference for better layout management.
- Updated Wallet components to utilize `PlayerMoneyDisplay` for consistent currency representation and added credit mode handling in various screens.
- Enhanced the WalletScreen and Transfer screens with loading panels and credit guard logic for better user experience during wallet operations.
This commit is contained in:
2026-06-22 10:50:52 +08:00
parent 34b851d7e1
commit ecb032f8cc
43 changed files with 756 additions and 297 deletions

View File

@@ -23,6 +23,7 @@ type HallBetResultDialogProps = {
currencyCode: string;
data: TicketPlaceData | null;
jackpotEnabled?: boolean;
creditMode?: boolean;
};
const SUCCESS_ITEM_STATUSES = new Set(["pending_draw", "placed"]);
@@ -34,6 +35,7 @@ export function HallBetResultDialog({
currencyCode,
data,
jackpotEnabled = false,
creditMode = false,
}: HallBetResultDialogProps) {
const { t } = useTranslation("player");
@@ -178,7 +180,10 @@ export function HallBetResultDialog({
<span className="font-mono font-black text-[#0b3f96]">{data.order_no}</span>
</p>
<p>
{t("hall.result.balanceAfter")}:{" "}
{creditMode
? t("hall.result.creditBalanceAfter", { defaultValue: "可用信用" })
: t("hall.result.balanceAfter")}
:{" "}
<span className="font-semibold text-slate-950">
{formatMinorAsCurrency(data.balance_after, currencyCode)}
</span>
@@ -200,7 +205,9 @@ export function HallBetResultDialog({
<table className="min-w-[430px] w-full border-collapse text-xs">
<thead className="bg-[#f4f7fd] text-[#304f86]">
<tr>
<th className="w-10 border-r border-[#dfe8f6] px-2 py-2.5 text-center font-black">No.</th>
<th className="w-10 border-r border-[#dfe8f6] px-2 py-2.5 text-center font-black">
{t("hall.table.no")}
</th>
<th className="border-r border-[#dfe8f6] px-2 py-2.5 text-center font-black">
{t("hall.result.number")}
</th>