From f6e6c177e0e410ade56abc70f63d5dbeae17d1f5 Mon Sep 17 00:00:00 2001 From: chenhang Date: Thu, 9 Jul 2026 19:07:09 +0800 Subject: [PATCH] fix(splash): hide experimental splash components --- .../components/splash-screen.module.css | 5 +--- src/app/splash/splash-screen.tsx | 27 ++++++++++++------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/app/splash/components/splash-screen.module.css b/src/app/splash/components/splash-screen.module.css index b1db338e..9f7b14e6 100644 --- a/src/app/splash/components/splash-screen.module.css +++ b/src/app/splash/components/splash-screen.module.css @@ -31,10 +31,7 @@ padding: calc(var(--page-padding-y, 20px) + var(--app-safe-top, 0px)) calc(var(--page-padding-x, 26px) + var(--app-safe-right, 0px)) - calc( - var(--spacing-md, 12px) + var(--app-safe-bottom, 0px) + - var(--app-bottom-nav-height, 64px) - ) + calc(var(--page-padding-y, 20px) + var(--app-safe-bottom, 0px)) calc(var(--page-padding-x, 26px) + var(--app-safe-left, 0px)); } diff --git a/src/app/splash/splash-screen.tsx b/src/app/splash/splash-screen.tsx index ebd9b50a..ecd088bf 100644 --- a/src/app/splash/splash-screen.tsx +++ b/src/app/splash/splash-screen.tsx @@ -2,20 +2,21 @@ import { useEffect } from "react"; -import { AppBottomNav, MobileShell } from "@/app/_components/core"; +import { MobileShell } from "@/app/_components/core"; +// import { AppBottomNav } from "@/app/_components/core"; import { ROUTES } from "@/router/routes"; import { useAppNavigator } from "@/router/use-app-navigator"; -import { useAuthState } from "@/stores/auth/auth-context"; +// import { useAuthState } from "@/stores/auth/auth-context"; import { pwaUtil } from "@/utils"; import { SplashBackground, SplashButton, SplashContent, - SplashLatestMessage, + // SplashLatestMessage, SplashLogo, } from "./components"; -import { useSplashLatestMessage } from "./hooks/use-splash-latest-message"; +// import { useSplashLatestMessage } from "./hooks/use-splash-latest-message"; import styles from "./components/splash-screen.module.css"; // 尽量早地缓存 beforeinstallprompt,避免用户停留 splash 时浏览器事件已触发并丢失。 @@ -25,20 +26,22 @@ if (typeof window !== "undefined") { export function SplashScreen() { const navigator = useAppNavigator(); - const authState = useAuthState(); - const latestMessage = useSplashLatestMessage({ - hasInitialized: authState.hasInitialized, - isAuthLoading: authState.isLoading, - loginStatus: authState.loginStatus, - }); + // const authState = useAuthState(); + // const latestMessage = useSplashLatestMessage({ + // hasInitialized: authState.hasInitialized, + // isAuthLoading: authState.isLoading, + // loginStatus: authState.loginStatus, + // }); const handleStartChat = () => { navigator.openChat({ replace: true }); }; + /* const handleOpenPrivateRoom = () => { navigator.push(ROUTES.privateRoom, { scroll: false }); }; + */ const handleOpenSplash = () => { navigator.push(ROUTES.splash, { scroll: false }); @@ -57,11 +60,13 @@ export function SplashScreen() {
+ {/* + */}
@@ -72,12 +77,14 @@ export function SplashScreen() { 24/7 online | Chat | Companion | Heal | Sweet moments

+ {/* + */}
);