feat(ui): implement multi-select and fix finder reveal

- Fix 'Show in finder' for unfinished entries to open destination folder
- Add 'Add to queue' submenu for unfinished items
- Support Shift/Cmd modifiers for multi-selection in download list
- Implement mass-action context menu for multi-selected downloads
- Enhance DeleteConfirmationModal to handle mass deletions gracefully
This commit is contained in:
NimBold
2026-06-21 00:52:43 +03:30
parent 226c7913f5
commit cd0397ea00
5 changed files with 295 additions and 141 deletions
+8 -3
View File
@@ -154,7 +154,7 @@ export type DownloadDraft = Omit<DownloadItem, 'status' | 'queueId' | 'hasBeenDi
export type DeleteModalState = {
isOpen: boolean;
downloadId?: string;
downloadIds?: string[];
};
interface DownloadState {
@@ -187,7 +187,7 @@ interface DownloadState {
) => void;
handleExtensionDownload: (request: ExtensionDownloadRequest) => void;
deleteModalState: DeleteModalState;
openDeleteModal: (downloadId?: string) => void;
openDeleteModal: (downloadIds?: string | string[]) => void;
closeDeleteModal: () => void;
setSelectedPropertiesDownloadId: (id: string | null) => void;
addDownload: (item: DownloadDraft, action: AddDownloadAction) => Promise<void>;
@@ -258,7 +258,12 @@ export const useDownloadStore = create<DownloadState>((set, get) => ({
activeMetadataUrl: null,
parsingError: null,
deleteModalState: { isOpen: false },
openDeleteModal: (downloadId) => set({ deleteModalState: { isOpen: true, downloadId } }),
openDeleteModal: (downloadIds) => set({
deleteModalState: {
isOpen: true,
downloadIds: Array.isArray(downloadIds) ? downloadIds : (downloadIds ? [downloadIds] : undefined)
}
}),
closeDeleteModal: () => set({ deleteModalState: { isOpen: false } }),
toggleAddModal: (isOpen) => set({
isAddModalOpen: isOpen,