refactor(chat): align chat header and input bar with Dart source

This commit is contained in:
2026-06-10 11:59:53 +08:00
parent 1e5b7420d3
commit 1db3e3ae31
17 changed files with 183 additions and 688 deletions
+39 -35
View File
@@ -24,6 +24,8 @@ import Image from "next/image";
import { useChatDispatch, useChatState } from "@/stores/chat/chat-context";
import { GuestChatQuota } from "@/stores/chat/chat-types";
import { MobileShell } from "@/app/_components/core/mobile-shell";
import { BrowserHintOverlay } from "./browser-hint-overlay";
import { ChatArea } from "./chat-area";
import { ChatHeader } from "./chat-header";
@@ -76,42 +78,44 @@ export function ChatScreen() {
}, [state.guestRemainingQuota, state.isGuest]);
return (
<div className={styles.shell}>
{/* 背景图(与原 Dart MobileLayout 一致) */}
<div className={styles.background}>
<Image
src="/images/chat/bg-chatpage.png"
alt=""
fill
priority
sizes="(max-width: 500px) 100vw, 500px"
<MobileShell>
<div className={styles.shell}>
{/* 背景图(与原 Dart MobileLayout 一致) */}
<div className={styles.background}>
<Image
src="/images/chat/bg-chatpage.png"
alt=""
fill
priority
sizes="(max-width: 500px) 100vw, 500px"
/>
</div>
<div className={styles.layout}>
<ChatHeader isGuest={state.isGuest} />
<ChatArea
messages={state.messages}
isReplyingAI={state.isReplyingAI}
isGuest={state.isGuest}
/>
<ChatInputBar disabled={state.isReplyingAI} />
</div>
{/* 浏览器提示(应用内浏览器检测) */}
<BrowserHintOverlay />
{/* PWA 安装提示触发器(无可见 UI3.5s 后弹 dialog */}
<PwaInstallOverlay />
{/* 配额告警弹窗 */}
<QuotaDialog
open={quotaDialogOpen}
onClose={() => setQuotaDialogOpen(false)}
isExhausted={quotaExhausted}
/>
</div>
<div className={styles.layout}>
<ChatHeader isGuest={state.isGuest} />
<ChatArea
messages={state.messages}
isReplyingAI={state.isReplyingAI}
isGuest={state.isGuest}
/>
<ChatInputBar disabled={state.isReplyingAI} />
</div>
{/* 浏览器提示(应用内浏览器检测) */}
<BrowserHintOverlay />
{/* PWA 安装提示触发器(无可见 UI3.5s 后弹 dialog */}
<PwaInstallOverlay />
{/* 配额告警弹窗 */}
<QuotaDialog
open={quotaDialogOpen}
onClose={() => setQuotaDialogOpen(false)}
isExhausted={quotaExhausted}
/>
</div>
</MobileShell>
);
}