mirror of
https://github.com/JefferyHcool/BiliNote.git
synced 2026-06-01 00:59:33 +08:00
- 使用 react-resizable-panels 实现可调整大小的面板 - 重新布局首页结构,分为左、中、右三个可调整区域 - 更新 NoteForm 和 NoteHistory 组件以适应新布局 - 调整 History 组件样式,优化滚动体验 - 更新项目依赖,添加 react-resizable-panels
27 lines
1.0 KiB
TypeScript
27 lines
1.0 KiB
TypeScript
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="w-full sm:h-[480px] md:h-[720px] lg:h-[92%]">
|
|
{/*<div className="w-full flex-1 overflow-y-auto">*/}
|
|
<NoteHistory onSelect={setCurrentTask} selectedId={currentTaskId} />
|
|
{/*</div>*/}
|
|
</ScrollArea>
|
|
</div>
|
|
</>
|
|
)
|
|
}
|
|
|
|
export default History
|