From 0593920318a48a496ae1935cb3ce050c562ef77a Mon Sep 17 00:00:00 2001 From: chenhang Date: Wed, 10 Jun 2026 18:18:03 +0800 Subject: [PATCH] chore: cleanup unused exports and fix mobile shell background - Remove unused CharacterIntro export from chat components index - Drop stale JSDoc block from splash-screen server component - Set mobile shell background to explicit black so the desktop area outside the 500px viewport is black instead of inheriting from parent --- .../_components/core/mobile-shell.module.css | 2 +- .../components/character-intro.module.css | 17 -------- src/app/chat/components/character-intro.tsx | 40 ------------------- src/app/chat/components/index.ts | 1 - src/app/splash/components/splash-screen.tsx | 10 ----- 5 files changed, 1 insertion(+), 69 deletions(-) delete mode 100644 src/app/chat/components/character-intro.module.css delete mode 100644 src/app/chat/components/character-intro.tsx diff --git a/src/app/_components/core/mobile-shell.module.css b/src/app/_components/core/mobile-shell.module.css index 197af616..ffc8034e 100644 --- a/src/app/_components/core/mobile-shell.module.css +++ b/src/app/_components/core/mobile-shell.module.css @@ -5,7 +5,7 @@ justify-content: center; width: 100%; min-height: 100dvh; - background: inherit; + background: #000000; /* 显式黑,桌面端 500px 外圈为黑色 */ } .content { diff --git a/src/app/chat/components/character-intro.module.css b/src/app/chat/components/character-intro.module.css deleted file mode 100644 index adaddc8c..00000000 --- a/src/app/chat/components/character-intro.module.css +++ /dev/null @@ -1,17 +0,0 @@ -/* CharacterIntro 角色介绍样式 */ - -.intro { - padding: var(--spacing-2, 8px) var(--spacing-5, 20px); -} - -.card { - padding: var(--spacing-3, 12px); - background: var(--color-bubble-background, rgba(255, 255, 255, 0.05)); - border-radius: var(--radius-md, 8px); - font-size: var(--font-size-sm, 14px); - line-height: 1.5; - color: var(--color-text-secondary, #9e9e9e); - max-height: 7.5em; /* 5 行 max */ - overflow: hidden; - backdrop-filter: blur(10px); -} diff --git a/src/app/chat/components/character-intro.tsx b/src/app/chat/components/character-intro.tsx deleted file mode 100644 index 4bccf83a..00000000 --- a/src/app/chat/components/character-intro.tsx +++ /dev/null @@ -1,40 +0,0 @@ -"use client"; -/** - * CharacterIntro 角色介绍卡片 - * - * 原始 Dart: lib/ui/chat/widgets/character_intro.dart(49 行) - * - * 视觉:模糊背景卡片,灰色字体,5 行 max - * 用途:首次进入聊天时展示 AI 角色介绍(Elio 设定) - */ -import styles from "./character-intro.module.css"; - -export interface CharacterIntroProps { - /** 角色介绍文本 */ - text?: string; - /** 最大行数(默认 5) */ - maxLines?: number; -} - -const DEFAULT_TEXT = - "Meet Elio Silvestri, your exclusive AI boyfriend. " + - "He's charming, witty, and always there for you. " + - "Chat with him anytime, anywhere — about your day, your dreams, or anything in between."; - -export function CharacterIntro({ text, maxLines = 5 }: CharacterIntroProps) { - return ( -
-
- {text ?? DEFAULT_TEXT} -
-
- ); -} diff --git a/src/app/chat/components/index.ts b/src/app/chat/components/index.ts index e2de7188..39b441d6 100644 --- a/src/app/chat/components/index.ts +++ b/src/app/chat/components/index.ts @@ -32,5 +32,4 @@ export { PwaInstallDialog } from "./pwa-install-dialog"; export { PwaInstallOverlay } from "./pwa-install-overlay"; export { BrowserHintOverlay } from "./browser-hint-overlay"; export { AiDisclosureBanner } from "./ai-disclosure-banner"; -export { CharacterIntro } from "./character-intro"; export { LanguageDialog, DEFAULT_LANGUAGES } from "./language-dialog"; diff --git a/src/app/splash/components/splash-screen.tsx b/src/app/splash/components/splash-screen.tsx index 44dae1fb..245be8da 100644 --- a/src/app/splash/components/splash-screen.tsx +++ b/src/app/splash/components/splash-screen.tsx @@ -1,13 +1,3 @@ -/** - * Splash 屏幕(纯布局 / Server Component) - * - * 鉴权流程逻辑已封装到 `` 内部(client 组件): - * - 已登录检测 / 登录成功跳转 / Facebook 登录 dispatch - * - 跨 store 初始化(ChatAuthStatusChanged / UserInit) - * - * 本组件职责:纯 JSX 布局,无 hooks → 可作为 Server Component 直接 SSR。 - */ - import { MobileShell } from "@/app/_components/core/mobile-shell"; import { SplashBackground } from "./splash-background";