refactor(layout): 重构布局组件并添加新功能

- 更新 Header 组件,增加项目标题和历史记录切换按钮
- 新增 DataNavigation 组件用于数据导航
- 添加 Playground 相关新组件,包括数据、场景、团队等信息展示
- 重构 Layout 组件,使用 Context 管理历史记录状态
- 更新 zh/option.json 文件,添加新的项目标题和对话相关翻译
This commit is contained in:
zhaoweijie
2025-08-19 16:20:37 +08:00
parent ef0e315bdc
commit 1104fb2733
33 changed files with 1008 additions and 258 deletions

View File

@@ -0,0 +1,38 @@
import React from "react";
import { Typography, Button } from "antd";
import { AcademicCapIcon, ChevronRightIcon } from "@heroicons/react/24/outline";
const { Title } = Typography;
type Props = {
Header: React.ReactNode;
showButton?: boolean;
onClick?: () => void;
};
export const DataNavigation: React.FC<Props> = ({ Header, showButton = true, onClick }) => {
return (
<div className="flex items-center justify-between bg-white dark:bg-gray-800 rounded-lg mb-3">
{/* 左侧部分 */}
<div className="flex items-center">
<Title
level={4}
style={{ marginBottom: 0, color: "#1F2937", fontSize: "16px" }}>
{Header}
</Title>
</div>
{/* 右侧部分 */}
{showButton && (
<Button
color="default"
variant="link"
style={{ gap: 4 }}
onClick={onClick}>
<span className="text-sm"></span>
<ChevronRightIcon className="w-4 h-4" />
</Button>
)}
</div>
)
};