From 53b7ea620373cd3337fa245628d064594551a072 Mon Sep 17 00:00:00 2001 From: Trekky12 Date: Wed, 18 Sep 2024 19:50:08 +0200 Subject: [PATCH] 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. --- web/apps/photos/src/components/PhotoFrame.tsx | 4 +++- web/apps/photos/src/pages/deduplicate.tsx | 1 + web/apps/photos/src/pages/gallery.tsx | 1 + web/apps/photos/src/pages/shared-albums.tsx | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/web/apps/photos/src/components/PhotoFrame.tsx b/web/apps/photos/src/components/PhotoFrame.tsx index 5ecf943c53..e2c7832d00 100644 --- a/web/apps/photos/src/components/PhotoFrame.tsx +++ b/web/apps/photos/src/components/PhotoFrame.tsx @@ -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(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, diff --git a/web/apps/photos/src/pages/deduplicate.tsx b/web/apps/photos/src/pages/deduplicate.tsx index df8e610ca4..c305feef2c 100644 --- a/web/apps/photos/src/pages/deduplicate.tsx +++ b/web/apps/photos/src/pages/deduplicate.tsx @@ -196,6 +196,7 @@ export default function Deduplicate() { activeCollectionID={ALL_SECTION} fileToCollectionsMap={fileToCollectionsMap} collectionNameMap={collectionNameMap} + selectable={true} /> )} )} {selected.count > 0 && diff --git a/web/apps/photos/src/pages/shared-albums.tsx b/web/apps/photos/src/pages/shared-albums.tsx index 3b843c8bd8..73c6bc592c 100644 --- a/web/apps/photos/src/pages/shared-albums.tsx +++ b/web/apps/photos/src/pages/shared-albums.tsx @@ -562,6 +562,7 @@ export default function PublicCollectionGallery() { setFilesDownloadProgressAttributesCreator={ setFilesDownloadProgressAttributesCreator } + selectable={downloadEnabled} /> {blockingLoad && (