feat: show vault root in folder tree

This commit is contained in:
lucaronin
2026-04-30 00:18:33 +02:00
parent ce859aa0e7
commit ec83e9b839
17 changed files with 442 additions and 159 deletions

View File

@@ -24,7 +24,10 @@ function useExpandedFolders(selection: SidebarSelection, renamingFolderPath?: st
)
const toggleFolder = useCallback((path: string) => {
setManualExpanded((current) => ({ ...current, [path]: !current[path] }))
setManualExpanded((current) => {
const defaultExpanded = path === ''
return { ...current, [path]: !(current[path] ?? defaultExpanded) }
})
}, [])
return {