refactor: 重构视频面板 UI,情景选择改为卡片网格,控制按钮改为 SVG 图标
- 情景选择从 ChatPanel header 下拉菜单迁移至视频面板下方卡片网格 - 摄像头/麦克风按钮改为圆形 SVG 图标按钮 - 识别/中断/停止按钮改为药丸形状 SVG 图标按钮 - 设备选择器改为水平布局,优化空间利用 - 移除 ChatPanel 空状态中重复的情景卡片 - .gitignore 忽略 .claudian/ 和笔记目录
This commit is contained in:
@@ -121,34 +121,14 @@ export function ChatPanel({
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* 空状态:情景选择 + 场景卡片 */}
|
||||
{/* 空状态:欢迎信息 */}
|
||||
{isEmpty && (
|
||||
<div className="chat-panel__welcome">
|
||||
<span className="chat-panel__welcome-icon">{scenarios.find(s => s.id === activeScenario)?.icon || "💬"}</span>
|
||||
<p>{isConnected ? t("chat.welcome.prompt") : t("chat.empty.prompt")}</p>
|
||||
<span className="chat-panel__welcome-hint">{isConnected ? t("chat.welcome.hint") : t("chat.empty.hint")}</span>
|
||||
|
||||
{/* 情景选择卡片(非 free_chat 时隐藏,因为已通过 header 切换) */}
|
||||
{isFreeChat && onSelectScenario && (
|
||||
<div className="scenario-cards">
|
||||
<div className="scenario-cards__title">{t("scenario.choose")}</div>
|
||||
{scenarios.filter(s => s.id !== "free_chat").map((sc) => (
|
||||
<button
|
||||
key={sc.id}
|
||||
className="scenario-card"
|
||||
onClick={() => onSelectScenario(sc.id)}
|
||||
>
|
||||
<span className="scenario-card__icon">{sc.icon}</span>
|
||||
<div className="scenario-card__text">
|
||||
<span className="scenario-card__title">{t(sc.nameKey)}</span>
|
||||
<span className="scenario-card__desc">{t(sc.descKey)}</span>
|
||||
</div>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* 视觉分析快捷卡片(仅 free_chat 模式) */}
|
||||
{/* 视觉分析快捷卡片(仅 free_chat 模式 + 已连接) */}
|
||||
{isFreeChat && isConnected && (
|
||||
<div className="scene-cards">
|
||||
{sceneCards.map((card) => (
|
||||
|
||||
Reference in New Issue
Block a user