feat: add jackpot animations and enhance currency handling across components

- Introduced new CSS animations for jackpot effects to improve visual engagement.
- Integrated CurrencySwitcher into PlayerPanel and HallScreen for better currency management.
- Updated various components to utilize active player currency for consistent display.
- Enhanced event handling for currency changes to ensure real-time updates across the application.
This commit is contained in:
2026-05-25 14:31:38 +08:00
parent 2bf44e4c29
commit 9bd7cc9b9e
37 changed files with 1030 additions and 180 deletions

View File

@@ -18,6 +18,7 @@ export function HydratePlayerAuth(): null {
const setCurrencies = usePlayerSessionStore((state) => state.setCurrencies);
useEffect(() => {
usePlayerSessionStore.getState().reconcileSelectedCurrency();
const token = restoreBearerToken();
void (async () => {
try {

View File

@@ -3,6 +3,7 @@
import { UserRound } from "lucide-react";
import { useTranslation } from "react-i18next";
import { useActivePlayerCurrency } from "@/hooks/use-active-player-currency";
import { cn } from "@/lib/utils";
import { usePlayerSessionStore } from "@/stores/player-session-store";
@@ -11,6 +12,7 @@ import { usePlayerSessionStore } from "@/stores/player-session-store";
*/
export function PlayerSessionBar({ className }: { className?: string }) {
const profile = usePlayerSessionStore((s) => s.profile);
const { activeCurrency } = useActivePlayerCurrency();
const { t } = useTranslation("player");
const label =
@@ -32,10 +34,10 @@ export function PlayerSessionBar({ className }: { className?: string }) {
<p className="truncate text-xs font-medium text-foreground">
{label ?? "…"}
</p>
{profile?.default_currency ? (
{activeCurrency ? (
<p className="truncate text-[10px] text-muted-foreground">
{profile.default_currency.toUpperCase()}
{profile.locale ? (
{activeCurrency}
{profile?.locale ? (
<span className="text-muted-foreground/80">
{" "}
· {profile.locale}