fix(splash): hide experimental splash components
Docker Image / Build and Push Docker Image (push) Successful in 1m49s
Docker Image / Build and Push Docker Image (push) Successful in 1m49s
This commit is contained in:
@@ -31,7 +31,7 @@
|
|||||||
padding:
|
padding:
|
||||||
calc(var(--page-padding-y, 20px) + var(--app-safe-top, 0px))
|
calc(var(--page-padding-y, 20px) + var(--app-safe-top, 0px))
|
||||||
calc(var(--page-padding-x, 26px) + var(--app-safe-right, 0px))
|
calc(var(--page-padding-x, 26px) + var(--app-safe-right, 0px))
|
||||||
calc(var(--spacing-md, 12px) + var(--app-safe-bottom, 0px) + 86px)
|
calc(var(--page-padding-y, 20px) + var(--app-safe-bottom, 0px))
|
||||||
calc(var(--page-padding-x, 26px) + var(--app-safe-left, 0px));
|
calc(var(--page-padding-x, 26px) + var(--app-safe-left, 0px));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,20 +2,16 @@
|
|||||||
|
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
|
|
||||||
import { AppBottomNav, MobileShell } from "@/app/_components/core";
|
import { MobileShell } from "@/app/_components/core";
|
||||||
import { ROUTES } from "@/router/routes";
|
|
||||||
import { useAppNavigator } from "@/router/use-app-navigator";
|
import { useAppNavigator } from "@/router/use-app-navigator";
|
||||||
import { useAuthState } from "@/stores/auth/auth-context";
|
|
||||||
import { pwaUtil } from "@/utils";
|
import { pwaUtil } from "@/utils";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
SplashBackground,
|
SplashBackground,
|
||||||
SplashButton,
|
SplashButton,
|
||||||
SplashContent,
|
SplashContent,
|
||||||
SplashLatestMessage,
|
|
||||||
SplashLogo,
|
SplashLogo,
|
||||||
} from "./components";
|
} from "./components";
|
||||||
import { useSplashLatestMessage } from "./hooks/use-splash-latest-message";
|
|
||||||
import styles from "./components/splash-screen.module.css";
|
import styles from "./components/splash-screen.module.css";
|
||||||
|
|
||||||
// 尽量早地缓存 beforeinstallprompt,避免用户停留 splash 时浏览器事件已触发并丢失。
|
// 尽量早地缓存 beforeinstallprompt,避免用户停留 splash 时浏览器事件已触发并丢失。
|
||||||
@@ -25,21 +21,11 @@ if (typeof window !== "undefined") {
|
|||||||
|
|
||||||
export function SplashScreen() {
|
export function SplashScreen() {
|
||||||
const navigator = useAppNavigator();
|
const navigator = useAppNavigator();
|
||||||
const authState = useAuthState();
|
|
||||||
const latestMessage = useSplashLatestMessage({
|
|
||||||
hasInitialized: authState.hasInitialized,
|
|
||||||
isAuthLoading: authState.isLoading,
|
|
||||||
loginStatus: authState.loginStatus,
|
|
||||||
});
|
|
||||||
|
|
||||||
const handleStartChat = () => {
|
const handleStartChat = () => {
|
||||||
navigator.openChat({ replace: true });
|
navigator.openChat({ replace: true });
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleOpenPrivateRoom = () => {
|
|
||||||
navigator.push(ROUTES.privateRoom, { scroll: false });
|
|
||||||
};
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
pwaUtil.prepareInstallPrompt();
|
pwaUtil.prepareInstallPrompt();
|
||||||
}, []);
|
}, []);
|
||||||
@@ -53,11 +39,6 @@ export function SplashScreen() {
|
|||||||
<div className={styles.content}>
|
<div className={styles.content}>
|
||||||
<SplashLogo />
|
<SplashLogo />
|
||||||
<div className={styles.spacer} />
|
<div className={styles.spacer} />
|
||||||
<SplashLatestMessage
|
|
||||||
message={latestMessage.message}
|
|
||||||
isLoading={latestMessage.isLoading}
|
|
||||||
onOpenChat={handleStartChat}
|
|
||||||
/>
|
|
||||||
<SplashContent />
|
<SplashContent />
|
||||||
<div className={styles.buttonArea}>
|
<div className={styles.buttonArea}>
|
||||||
<SplashButton onStartChat={handleStartChat} />
|
<SplashButton onStartChat={handleStartChat} />
|
||||||
@@ -68,12 +49,6 @@ export function SplashScreen() {
|
|||||||
24/7 online | Chat | Companion | Heal | Sweet moments
|
24/7 online | Chat | Companion | Heal | Sweet moments
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<AppBottomNav
|
|
||||||
activeItem={null}
|
|
||||||
variant="dark"
|
|
||||||
onChatClick={handleStartChat}
|
|
||||||
onPrivateRoomClick={handleOpenPrivateRoom}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</MobileShell>
|
</MobileShell>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user