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:
@@ -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 { BrowserHintOverlay } from "./browser-hint-overlay";
|
||||
export { AiDisclosureBanner } from "./ai-disclosure-banner";
|
||||
export { CharacterIntro } from "./character-intro";
|
||||
export { LanguageDialog, DEFAULT_LANGUAGES } from "./language-dialog";
|
||||
|
||||
Reference in New Issue
Block a user