mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-19 15:46:17 +00:00
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:
@@ -13,6 +13,8 @@ interface DownloadItemProps {
|
||||
handleResume: (item: DownloadItemType) => void;
|
||||
handleDoubleClick: (item: DownloadItemType) => void;
|
||||
getCategoryIcon: (category: string) => React.ReactNode;
|
||||
isSelected: boolean;
|
||||
onClick: (e: React.MouseEvent, item: DownloadItemType) => void;
|
||||
}
|
||||
|
||||
export const DownloadItem = React.memo<DownloadItemProps>(({
|
||||
@@ -24,6 +26,8 @@ export const DownloadItem = React.memo<DownloadItemProps>(({
|
||||
handleResume,
|
||||
handleDoubleClick,
|
||||
getCategoryIcon,
|
||||
isSelected,
|
||||
onClick,
|
||||
}) => {
|
||||
const download = useDownloadStore(state => state.downloads.find(d => d.id === downloadId));
|
||||
const pendingOrder = useDownloadStore(state => state.pendingOrder);
|
||||
@@ -66,8 +70,9 @@ export const DownloadItem = React.memo<DownloadItemProps>(({
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`download-row group cursor-default relative ${index % 2 !== 0 ? 'striped' : ''}`}
|
||||
className={`download-row group cursor-default relative ${index % 2 !== 0 ? 'striped' : ''} ${isSelected ? 'is-selected' : ''}`}
|
||||
style={{ gridTemplateColumns: tableGridTemplate }}
|
||||
onClick={(e) => onClick(e, download)}
|
||||
onContextMenu={(e) => {
|
||||
e.preventDefault();
|
||||
setContextMenu({ x: e.clientX, y: e.clientY, id: download.id });
|
||||
|
||||
Reference in New Issue
Block a user