feat: enhance player panel and draw status handling
- Refactored PlayerPanel layout for improved title positioning and responsiveness. - Added new function to check if betting is blocked based on hall status. - Updated HallDrawPanel to utilize the new betting status check and display appropriate messages. - Enhanced i18n support with new notices for review and non-bettable states across multiple languages.
This commit is contained in:
@@ -6,7 +6,6 @@ import type { ReactNode } from "react";
|
||||
import { Bell, ChevronLeft } from "lucide-react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import { CurrencySwitcher } from "@/components/currency-switcher";
|
||||
import { LanguageSwitcher } from "@/components/language-switcher";
|
||||
import {
|
||||
playerHeaderControl,
|
||||
@@ -48,10 +47,10 @@ export function PlayerPanel({
|
||||
<header
|
||||
className={cn(
|
||||
playerPageHeader,
|
||||
"sticky top-0 z-50 overflow-visible bg-white/95 backdrop-blur pt-2 pb-2 -mx-3 px-3",
|
||||
"sticky top-0 z-50 bg-white/95 backdrop-blur pt-2 pb-2 -mx-3 px-3",
|
||||
)}
|
||||
>
|
||||
<div className="flex min-w-0 justify-start">
|
||||
<div className="relative z-[1] flex min-w-0 max-w-[38%] shrink-0 justify-start">
|
||||
<Link
|
||||
href={backHref}
|
||||
className={cn(
|
||||
@@ -64,22 +63,13 @@ export function PlayerPanel({
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
<div className="min-w-0 max-w-[min(52vw,12rem)] justify-self-center text-center">
|
||||
<h1 className="truncate text-base font-black leading-tight text-[#0b3f96]">
|
||||
{title}
|
||||
</h1>
|
||||
</div>
|
||||
<h1
|
||||
className="pointer-events-none absolute top-1/2 right-[5.25rem] left-[5.25rem] z-0 -translate-y-1/2 truncate text-center text-base font-black leading-tight text-[#0b3f96]"
|
||||
>
|
||||
{title}
|
||||
</h1>
|
||||
|
||||
<div className="flex min-w-0 items-center justify-end gap-1">
|
||||
<CurrencySwitcher
|
||||
variant="minimal"
|
||||
menuAlign="end"
|
||||
showLabel
|
||||
className={cn(
|
||||
playerHeaderControl,
|
||||
"rounded-full border border-[#e4eaf4] bg-[#f8fafc] [&_button]:h-8 [&_button]:gap-1 [&_button]:px-2 [&_button]:py-0 [&_button]:text-xs [&_button]:font-bold [&_button]:text-[#0b3f96]",
|
||||
)}
|
||||
/>
|
||||
<div className="relative z-[1] flex min-w-0 max-w-[48%] shrink-0 items-center justify-end gap-0.5">
|
||||
<LanguageSwitcher
|
||||
variant="minimal"
|
||||
menuAlign="end"
|
||||
|
||||
Reference in New Issue
Block a user