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
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 100dvh;
|
min-height: 100dvh;
|
||||||
background: inherit;
|
background: #000000; /* 显式黑,桌面端 500px 外圈为黑色 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
|
|||||||
@@ -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);
|
|
||||||
}
|
|
||||||
@@ -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 (
|
|
||||||
<div className={styles.intro} role="complementary" aria-label="Character intro">
|
|
||||||
<div
|
|
||||||
className={styles.card}
|
|
||||||
style={{
|
|
||||||
// 近似 -webkit-line-clamp(多行截断)
|
|
||||||
display: "-webkit-box",
|
|
||||||
WebkitLineClamp: maxLines,
|
|
||||||
WebkitBoxOrient: "vertical",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{text ?? DEFAULT_TEXT}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -32,5 +32,4 @@ export { PwaInstallDialog } from "./pwa-install-dialog";
|
|||||||
export { PwaInstallOverlay } from "./pwa-install-overlay";
|
export { PwaInstallOverlay } from "./pwa-install-overlay";
|
||||||
export { BrowserHintOverlay } from "./browser-hint-overlay";
|
export { BrowserHintOverlay } from "./browser-hint-overlay";
|
||||||
export { AiDisclosureBanner } from "./ai-disclosure-banner";
|
export { AiDisclosureBanner } from "./ai-disclosure-banner";
|
||||||
export { CharacterIntro } from "./character-intro";
|
|
||||||
export { LanguageDialog, DEFAULT_LANGUAGES } from "./language-dialog";
|
export { LanguageDialog, DEFAULT_LANGUAGES } from "./language-dialog";
|
||||||
|
|||||||
@@ -1,13 +1,3 @@
|
|||||||
/**
|
|
||||||
* Splash 屏幕(纯布局 / Server Component)
|
|
||||||
*
|
|
||||||
* 鉴权流程逻辑已封装到 `<SplashButton>` 内部(client 组件):
|
|
||||||
* - 已登录检测 / 登录成功跳转 / Facebook 登录 dispatch
|
|
||||||
* - 跨 store 初始化(ChatAuthStatusChanged / UserInit)
|
|
||||||
*
|
|
||||||
* 本组件职责:纯 JSX 布局,无 hooks → 可作为 Server Component 直接 SSR。
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { MobileShell } from "@/app/_components/core/mobile-shell";
|
import { MobileShell } from "@/app/_components/core/mobile-shell";
|
||||||
|
|
||||||
import { SplashBackground } from "./splash-background";
|
import { SplashBackground } from "./splash-background";
|
||||||
|
|||||||
Reference in New Issue
Block a user