Make images on deduplicate selectable
The duplicate images page has a image preselected but there is no checkbox available. When unselecting this image there is no possibility to do a new selection. This commit adds the same checkbox like on the gallery to select images on the deduplication page.
This commit is contained in:
@@ -66,6 +66,7 @@ interface Props {
|
||||
setIsPhotoSwipeOpen?: (value: boolean) => void;
|
||||
isInHiddenSection?: boolean;
|
||||
setFilesDownloadProgressAttributesCreator?: SetFilesDownloadProgressAttributesCreator;
|
||||
selectable?: boolean;
|
||||
}
|
||||
|
||||
const PhotoFrame = ({
|
||||
@@ -86,6 +87,7 @@ const PhotoFrame = ({
|
||||
setIsPhotoSwipeOpen,
|
||||
isInHiddenSection,
|
||||
setFilesDownloadProgressAttributesCreator,
|
||||
selectable,
|
||||
}: Props) => {
|
||||
const [open, setOpen] = useState(false);
|
||||
const [currentIndex, setCurrentIndex] = useState<number>(0);
|
||||
@@ -277,7 +279,7 @@ const PhotoFrame = ({
|
||||
file={item}
|
||||
updateURL={updateURL(index)}
|
||||
onClick={onThumbnailClick(index)}
|
||||
selectable={enableDownload}
|
||||
selectable={selectable}
|
||||
onSelect={handleSelect(
|
||||
item.id,
|
||||
item.ownerID === galleryContext.user?.id,
|
||||
|
||||
@@ -196,6 +196,7 @@ export default function Deduplicate() {
|
||||
activeCollectionID={ALL_SECTION}
|
||||
fileToCollectionsMap={fileToCollectionsMap}
|
||||
collectionNameMap={collectionNameMap}
|
||||
selectable={true}
|
||||
/>
|
||||
)}
|
||||
<DeduplicateOptions
|
||||
|
||||
@@ -1195,6 +1195,7 @@ export default function Gallery() {
|
||||
setFilesDownloadProgressAttributesCreator={
|
||||
setFilesDownloadProgressAttributesCreator
|
||||
}
|
||||
selectable={true}
|
||||
/>
|
||||
)}
|
||||
{selected.count > 0 &&
|
||||
|
||||
@@ -562,6 +562,7 @@ export default function PublicCollectionGallery() {
|
||||
setFilesDownloadProgressAttributesCreator={
|
||||
setFilesDownloadProgressAttributesCreator
|
||||
}
|
||||
selectable={downloadEnabled}
|
||||
/>
|
||||
{blockingLoad && (
|
||||
<LoadingOverlay>
|
||||
|
||||
Reference in New Issue
Block a user