mirror of
https://github.com/JefferyHcool/BiliNote.git
synced 2026-09-05 15:46:48 +08:00
feat(frontend): 重构首页布局并添加生成历史组件
- 新增 History 组件用于展示生成历史记录 - 调整 HomeLayout 布局,增加 History 侧边栏 - 优化 NoteHistory 组件样式和布局- 更新首页样式,调整各个组件的位置和样式
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user