π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Rename
Manav Rathi479f2188b64e
diff --git a/web/apps/photos/src/components/FileList.tsx b/web/apps/photos/src/components/FileList.tsxindex 940c25f5fa..61473c288e 100644--- a/web/apps/photos/src/components/FileList.tsx+++ b/web/apps/photos/src/components/FileList.tsx@@ -171,7 +171,11 @@ export interface FileListProps {* This behaviour is used when showing magic search results.*/disableGrouping?: boolean;- selectable?: boolean;+ /**+ * If `true`, then the user can select files in the listing by clicking on+ * their thumbnails (and other range selection mechanisms).+ */+ enableSelect?: boolean;setSelected: (selected: SelectedState | ((selected: SelectedState) => SelectedState),) => void;@@ -215,7 +219,7 @@ export const FileList: React.FC<FileListProps> = ({user,annotatedFiles,disableGrouping,- selectable,+ enableSelect,selected,setSelected,activeCollectionID,@@ -559,9 +563,8 @@ export const FileList: React.FC<FileListProps> = ({return (<FileThumbnailkey={`tile-${file.id}-selected-${selected[file.id] ?? false}`}- {...{ user, emailByUserID }}+ {...{ user, emailByUserID, enableSelect }}file={file}- selectable={selectable!}selected={(!mode? selected.collectionID ===@@ -630,7 +633,7 @@ export const FileList: React.FC<FileListProps> = ({onChangeSelectAllCheckBox,onItemClick,rangeStartIndex,- selectable,+ enableSelect,selected,user,],@@ -877,7 +880,6 @@ const FileListRow = memo(type FileThumbnailProps = {file: EnteFile;- selectable: boolean;selected: boolean;isRangeSelectActive: boolean;selectOnClick: boolean;@@ -889,12 +891,12 @@ type FileThumbnailProps = {onSelect: (checked: boolean) => void;onHover: () => void;onRangeSelect: () => void;-} & Pick<FileListProps, "user" | "emailByUserID">;+} & Pick<FileListProps, "user" | "emailByUserID" | "enableSelect">;const FileThumbnail: React.FC<FileThumbnailProps> = ({file,user,- selectable,+ enableSelect,selected,selectOnClick,isRangeSelectActive,@@ -983,9 +985,9 @@ const FileThumbnail: React.FC<FileThumbnailProps> = ({onClick={handleClick}onMouseEnter={handleHover}disabled={!imageURL}- {...(selectable && longPressHandlers)}+ {...(enableSelect && longPressHandlers)}>- {selectable && (+ {enableSelect && (<Checktype="checkbox"checked={selected}diff --git a/web/apps/photos/src/components/FileListWithViewer.tsx b/web/apps/photos/src/components/FileListWithViewer.tsxindex 0e8a35656b..3c9fbeb497 100644--- a/web/apps/photos/src/components/FileListWithViewer.tsx+++ b/web/apps/photos/src/components/FileListWithViewer.tsx@@ -59,7 +59,7 @@ export type FileListWithViewerProps = {| "header"| "footer"| "disableGrouping"- | "selectable"+ | "enableSelect"| "selected"| "setSelected"| "activeCollectionID"@@ -98,7 +98,7 @@ export const FileListWithViewer: React.FC<FileListWithViewerProps> = ({files,enableDownload,disableGrouping,- selectable,+ enableSelect,selected,setSelected,activeCollectionID,@@ -188,7 +188,7 @@ export const FileListWithViewer: React.FC<FileListWithViewerProps> = ({footer,user,disableGrouping,- selectable,+ enableSelect,selected,setSelected,activeCollectionID,diff --git a/web/apps/photos/src/pages/gallery.tsx b/web/apps/photos/src/pages/gallery.tsxindex bfd47be17a..635b9c303d 100644--- a/web/apps/photos/src/pages/gallery.tsx+++ b/web/apps/photos/src/pages/gallery.tsx@@ -1166,7 +1166,7 @@ const Page: React.FC = () => {files={filteredFiles}enableDownload={true}disableGrouping={state.searchSuggestion?.type == "clip"}- selectable={true}+ enableSelect={true}selected={selected}setSelected={setSelected}// TODO: Incorrect assertion, need to update the typediff --git a/web/apps/photos/src/pages/shared-albums.tsx b/web/apps/photos/src/pages/shared-albums.tsxindex b366b64378..a1c6450d6a 100644--- a/web/apps/photos/src/pages/shared-albums.tsx+++ b/web/apps/photos/src/pages/shared-albums.tsx@@ -499,7 +499,7 @@ export default function PublicCollectionGallery() {header={fileListHeader}footer={fileListFooter}enableDownload={downloadEnabled}- selectable={downloadEnabled}+ enableSelect={downloadEnabled}selected={selected}setSelected={setSelected}activeCollectionID={PseudoCollectionID.all}