mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 08:46:22 +02:00
feat(sidebar): enhance DocumentsSidebar with dropdown menu for local folder management and improve UI interactions
This commit is contained in:
parent
b5400caea6
commit
d1c14160e3
2 changed files with 89 additions and 71 deletions
|
|
@ -61,16 +61,6 @@ export function LocalFilesystemBrowser({
|
|||
const [expandedFolderKeys, setExpandedFolderKeys] = useState<Set<string>>(new Set());
|
||||
const supportedExtensions = useMemo(() => Array.from(getSupportedExtensionsSet()), []);
|
||||
|
||||
useEffect(() => {
|
||||
setExpandedFolderKeys((prev) => {
|
||||
const next = new Set(prev);
|
||||
for (const rootPath of rootPaths) {
|
||||
next.add(rootPath);
|
||||
}
|
||||
return next;
|
||||
});
|
||||
}, [rootPaths]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!electronAPI?.listFolderFiles) return;
|
||||
let cancelled = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue