feat(splash): add latest message entry

This commit is contained in:
2026-07-08 17:05:36 +08:00
parent c46b9b4cdd
commit 2704c7f307
10 changed files with 274 additions and 73 deletions
+13 -1
View File
@@ -2,7 +2,8 @@
import { useEffect } from "react";
import { MobileShell } from "@/app/_components/core";
import { AppBottomNav, MobileShell } from "@/app/_components/core";
import { ROUTES } from "@/router/routes";
import { useAppNavigator } from "@/router/use-app-navigator";
import { pwaUtil } from "@/utils";
@@ -10,6 +11,7 @@ import {
SplashBackground,
SplashButton,
SplashContent,
SplashLatestMessage,
SplashLogo,
} from "./components";
import styles from "./components/splash-screen.module.css";
@@ -26,6 +28,10 @@ export function SplashScreen() {
navigator.openChat({ replace: true });
};
const handleOpenPrivateRoom = () => {
navigator.push(ROUTES.privateRoom, { scroll: false });
};
useEffect(() => {
pwaUtil.prepareInstallPrompt();
}, []);
@@ -43,12 +49,18 @@ export function SplashScreen() {
<div className={styles.buttonArea}>
<SplashButton onStartChat={handleStartChat} />
</div>
<SplashLatestMessage onOpenChat={handleStartChat} />
<p className={styles.bottom}>
Elio Silvestri, Your exclusive AI boyfriend
<br />
24/7 online | Chat | Companion | Heal | Sweet moments
</p>
</div>
<AppBottomNav
activeItem={null}
onChatClick={handleStartChat}
onPrivateRoomClick={handleOpenPrivateRoom}
/>
</div>
</MobileShell>
);