Begun implementing collection history system

This commit is contained in:
patben8 committed 2026-07-09 10:20:49 +02:00
1 parent 75deded209
commit e8d2c66e06
19 files changed
+744 -54

No files matched your search

+10 -1
View File
@@ -9,6 +9,7 @@ interface Props {
source: Source
onSelect: (s: Source) => void
onError: (msg: string) => void
onOpenHistory: () => void
}
const icons: Record<string, string> = {
@@ -157,7 +158,7 @@ function NodeRow({
)
}
export function Sidebar({ source, onSelect, onError }: Props) {
export function Sidebar({ source, onSelect, onError, onOpenHistory }: Props) {
const qc = useQueryClient()
const [creating, setCreating] = useState(false)
const [newName, setNewName] = useState('')
@@ -245,6 +246,14 @@ export function Sidebar({ source, onSelect, onError }: Props) {
))}
</div>
<button
onClick={onOpenHistory}
className="flex items-center gap-2 border-t border-line px-4 py-2 text-left text-xs text-muted hover:bg-ink-800 hover:text-text"
>
<span className="text-[11px] text-faint">🕑</span>
Version history
</button>
<SaveBar onError={onError} />
</aside>
)