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
@@ -0,0 +1,26 @@
import NoteHistory from '@/pages/HomePage/components/NoteHistory.tsx'
import { useTaskStore } from '@/store/taskStore'
import { Info, Clock, Loader2 } from 'lucide-react'
import { ScrollArea } from '@/components/ui/scroll-area.tsx'
const History = () => {
const currentTaskId = useTaskStore(state => state.currentTaskId)
const setCurrentTask = useTaskStore(state => state.setCurrentTask)
return (
<>
<div className={'flex h-full w-full flex-col gap-4 px-2.5 py-1.5'}>
{/*生成历史 */}
<div className="my-4 flex h-[40px] items-center gap-2">
<Clock className="h-4 w-4 text-neutral-500" />
<h2 className="text-base font-medium text-neutral-900"></h2>
</div>
<ScrollArea className="h-[800px] w-full">
{/*<div className="w-full flex-1 overflow-y-auto">*/}
<NoteHistory onSelect={setCurrentTask} selectedId={currentTaskId} />
{/*</div>*/}
</ScrollArea>
</div>
</>
)
}
export default History