feat(frontend): 重构首页布局并添加生成历史组件

- 新增 History 组件用于展示生成历史记录
- 调整 HomeLayout 布局,增加 History 侧边栏
- 优化 NoteHistory 组件样式和布局- 更新首页样式,调整各个组件的位置和样式
This commit is contained in:
思诺特
2025-04-27 16:57:03 +08:00
parent 489fa78946
commit 84cd345b9f
15 changed files with 190 additions and 127 deletions

View File

@@ -13,15 +13,16 @@ import { Link } from 'react-router-dom'
interface IProps {
NoteForm: React.ReactNode
Preview: React.ReactNode
History: React.ReactNode
}
const HomeLayout: FC<IProps> = ({ NoteForm, Preview }) => {
const HomeLayout: FC<IProps> = ({ NoteForm, Preview, History }) => {
const [, setShowSettings] = useState(false)
return (
<div className="flex min-h-screen flex-col bg-white">
<div className="flex h-screen flex-col overflow-hidden bg-white">
<div className="flex flex-1">
{/* 左侧部分Header + 表单 */}
<aside className="flex w-[400px] flex-col border-r border-neutral-200 bg-white">
<aside className="flex w-[340px] flex-col border-r border-neutral-200 bg-white">
{/* Header */}
<header className="flex h-16 items-center justify-between px-6">
<div className="flex items-center gap-2">
@@ -52,6 +53,13 @@ const HomeLayout: FC<IProps> = ({ NoteForm, Preview }) => {
{NoteForm}
</div>
</aside>
<aside className="flex h-full w-[300px] flex-col border-r border-neutral-200 bg-white">
{/* Header */}
{/* 表单内容 */}
{/*<NoteForm />*/}
{History}
</aside>
{/* 右侧预览区域 */}
<main className="h-screen flex-1 overflow-hidden bg-white p-6">