diff --git a/public/card-bg.png b/public/card-bg.png new file mode 100644 index 0000000..3f360e2 Binary files /dev/null and b/public/card-bg.png differ diff --git a/public/test-host.html b/public/test-host.html index 0aee952..b748abe 100644 --- a/public/test-host.html +++ b/public/test-host.html @@ -182,6 +182,9 @@ const reloadButton = document.getElementById('reload') const logNode = document.getElementById('log') const iframeOrigin = window.location.origin + const apiBaseUrl = ['127.0.0.1', 'localhost'].includes(window.location.hostname) + ? `${window.location.origin}/api` + : 'https://playx-api.cjdhr.top/api' const maxLogEntries = 80 const logEntries = [] const heightLogDelay = 300 @@ -236,7 +239,7 @@ return existingToken } - const response = await fetch(`/api/v1/temLogin?username=${encodeURIComponent(username)}`, { + const response = await fetch(`${apiBaseUrl}/v1/temLogin?username=${encodeURIComponent(username)}`, { method: 'GET', }) diff --git a/src/features/authGuide.tsx b/src/features/authGuide.tsx index 105267f..21c22aa 100644 --- a/src/features/authGuide.tsx +++ b/src/features/authGuide.tsx @@ -50,6 +50,19 @@ export function AuthGuide({children}: PropsWithChildren) { } const {language, token} = message.payload + const normalizedLanguage = + typeof language === 'string' && language.trim() + ? normalizeLanguage(language) + : undefined + + console.log('[playx] received host payload:', { + payload: message.payload, + normalizedLanguage, + tokenPreview: + typeof token === 'string' && token.trim() + ? `${token.trim().slice(0, 12)}...` + : undefined, + }) if (typeof token === 'string' && token.trim()) { const normalizedToken = token.trim() @@ -63,7 +76,7 @@ export function AuthGuide({children}: PropsWithChildren) { } if (typeof language === 'string' && language.trim()) { - setLanguage(normalizeLanguage(language)) + setLanguage(normalizedLanguage ?? normalizeLanguage(language)) } } diff --git a/src/index.css b/src/index.css index d41ed1b..3f48430 100644 --- a/src/index.css +++ b/src/index.css @@ -172,31 +172,31 @@ body::-webkit-scrollbar, overflow: hidden; border-radius: 16px; border: 1px solid rgba(255, 214, 156, 0.12); + background-image: url("/card-bg.png"); + background-repeat: no-repeat; + background-position: center; + background-size: 100% 100%; box-shadow: inset 0 1px 0 rgba(255, 232, 193, 0.08), 0 18px 32px rgba(0, 0, 0, 0.22); } .home-stat-card::before { - content: ""; - position: absolute; - inset: 0; - background: - radial-gradient(circle at 14% 18%, rgba(255, 194, 84, 0.14), transparent 36%), - linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0)); - pointer-events: none; + content: none; } .home-stat-card-claim { - background: - linear-gradient(180deg, rgba(102, 76, 54, 0.16), rgba(58, 39, 28, 0.18)), - linear-gradient(135deg, rgba(88, 58, 40, 0.96) 0%, rgba(60, 42, 31, 0.94) 44%, rgba(49, 34, 27, 0.92) 100%); + background-image: url("/card-bg.png"); + background-repeat: no-repeat; + background-position: center; + background-size: 100% 100%; } .home-stat-card-limit { - background: - linear-gradient(180deg, rgba(124, 88, 57, 0.14), rgba(67, 47, 34, 0.12)), - linear-gradient(135deg, rgba(99, 72, 50, 0.96) 0%, rgba(70, 48, 35, 0.95) 46%, rgba(55, 37, 28, 0.94) 100%); + background-image: url("/card-bg.png"); + background-repeat: no-repeat; + background-position: center; + background-size: 100% 100%; } .home-withdraw-card { diff --git a/src/views/home/index.tsx b/src/views/home/index.tsx index 50bfe6a..91511c8 100644 --- a/src/views/home/index.tsx +++ b/src/views/home/index.tsx @@ -45,7 +45,7 @@ function QuickNavCard({icon: Icon, label, to}: QuickNavCardProps) { return (
@@ -157,7 +157,7 @@ function HomePage() { setLanguageModalOpen(true)} {...tapMotionProps} > @@ -231,8 +231,8 @@ function HomePage() {
-
+ className="home-withdraw-card pc-hover-float h-full min-h-[120px] pt-[14px] sm:py-[18px]"> +
{t('home.availableForWithdrawal')}