feat: add custom multi-folder picker

Replace native add-folder dialogs with an in-app folder picker that supports collecting folders from multiple locations before adding them together.

Add backend directory listing and batch add commands with duplicate skipping, plus store actions and a themed picker UI with a dedicated folders-to-add panel.
This commit is contained in:
2026-06-21 17:38:01 +01:00
parent f66fbe7931
commit 74a4134f2f
8 changed files with 720 additions and 42 deletions
+3 -6
View File
@@ -342,7 +342,7 @@ function FolderItem({
export function Sidebar() {
const folders = useGalleryStore((state) => state.folders);
const selectedFolderId = useGalleryStore((state) => state.selectedFolderId);
const addFolder = useGalleryStore((state) => state.addFolder);
const setFolderPickerOpen = useGalleryStore((state) => state.setFolderPickerOpen);
const indexingProgress = useGalleryStore((state) => state.indexingProgress);
const selectFolder = useGalleryStore((state) => state.selectFolder);
const activeView = useGalleryStore((state) => state.activeView);
@@ -459,11 +459,8 @@ export function Sidebar() {
}, 400);
};
const handleAddFolder = async () => {
const selected = await open({ directory: true, multiple: false, title: "Select Media Folder" });
if (selected && typeof selected === "string") {
await addFolder(selected);
}
const handleAddFolder = () => {
setFolderPickerOpen(true);
};
return (