- 设计 token 重映射为 DeepSeek 调色板(深浅双主题),正文改无衬线字体栈,全面去霓虹化 - 移除顶部 Header,控件迁入左栏(Logo/连接/通道/会话/tabs/底部操作区),左右栏支持拖拽调宽并持久化,折叠为图标 rail - 对话区对齐 DeepSeek 聊天风:hero/docked 状态机、736px 居中列、用户右对齐柔和气泡、助手无气泡平铺、composer 卡片与反差发送键;子智能体点击导航完整保留 - 全功能区同步换肤:侧栏列表、右栏面板、ConfigPage、弹窗、选择器等 - fix: 修复 virtual-core 3.17.x 陈旧行高导致消息行重叠(宽度变化/滚动停止后强制 resizeItem 重测) - fix: 修复 ConfigPage/Modal 引用不存在的 fadeIn/scaleIn keyframes 致入场动画失效
38 lines
1.4 KiB
TypeScript
38 lines
1.4 KiB
TypeScript
// Shared types and small components for Tab components
|
||
import type { ReactNode } from 'react';
|
||
import { Plus } from 'lucide-react';
|
||
import type { AppConfig } from './types';
|
||
|
||
/** 所有 Tab 组件共享的 props:完整 config + 顶层 update 回调 */
|
||
export interface TabProps {
|
||
config: AppConfig;
|
||
update: <K extends keyof AppConfig>(key: K, value: AppConfig[K]) => void;
|
||
}
|
||
|
||
/** 用于显示 toast 消息的回调(如切换失败提示) */
|
||
export interface ToastProps {
|
||
setToast: (msg: string) => void;
|
||
}
|
||
|
||
/** 通用「添加 XXX」虚线按钮,统一各 Tab 样式 */
|
||
export function AddButton({ label, onClick }: { label: string; onClick: () => void }) {
|
||
return (
|
||
<button
|
||
onClick={onClick}
|
||
className="flex items-center gap-2 px-4 py-2.5 rounded-xl border border-dashed border-[var(--border-color)] text-[var(--text-muted)] hover:text-[var(--accent-cyan)] hover:border-[var(--accent-cyan)]/30 transition-colors text-sm w-full justify-center"
|
||
>
|
||
<Plus className="h-4 w-4" /> {label}
|
||
</button>
|
||
);
|
||
}
|
||
|
||
/** 简单错误/提示气泡,统一红色错误样式 */
|
||
export function ErrorBanner({ children }: { children: ReactNode }) {
|
||
if (!children) return null;
|
||
return (
|
||
<div className="text-sm text-[rgb(242,90,90)] bg-[rgb(242,90,90)]/10 border border-[rgb(242,90,90)]/25 rounded-lg px-3 py-2">
|
||
{children}
|
||
</div>
|
||
);
|
||
}
|