π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Use
Manav Rathi476b1f98283d
diff --git a/web/apps/photos/src/components/PhotoViewer/FileInfo/index.tsx b/web/apps/photos/src/components/PhotoViewer/FileInfo/index.tsxindex 815988a674..3a90fd1798 100644--- a/web/apps/photos/src/components/PhotoViewer/FileInfo/index.tsx+++ b/web/apps/photos/src/components/PhotoViewer/FileInfo/index.tsx@@ -16,15 +16,11 @@ import {type ParsedMetadataDate,} from "@/media/file-metadata";import { FileType } from "@/media/file-type";-import {- FileOtherFaceList,- FilePeopleList,-} from "@/new/photos/components/PeopleList";+import { FilePeopleList } from "@/new/photos/components/PeopleList";import { PhotoDateTimePicker } from "@/new/photos/components/PhotoDateTimePicker";import { fileInfoDrawerZIndex } from "@/new/photos/components/utils/z-index";import { tagNumericValue, type RawExifTags } from "@/new/photos/services/exif";import {- AnnotatedFacesForFile,getAnnotatedFacesForFile,isMLEnabled,type AnnotatedFaceID,@@ -110,9 +106,7 @@ export const FileInfo: React.FC<FileInfoProps> = ({const [exifInfo, setExifInfo] = useState<ExifInfo | undefined>();const { show: showRawExif, props: rawExifVisibilityProps } =useModalVisibility();- const [annotatedFaces, setAnnotatedFaces] = useState<- AnnotatedFacesForFile | undefined- >();+ const [annotatedFaces, setAnnotatedFaces] = useState<AnnotatedFaceID[]>([]);const location = useMemo(() => {if (file) {@@ -305,18 +299,12 @@ export const FileInfo: React.FC<FileInfoProps> = ({</InfoItem>)}- {isMLEnabled() && annotatedFaces && (- <>- <FilePeopleList- file={file}- annotatedFaceIDs={annotatedFaces.annotatedFaceIDs}- onSelectFace={handleSelectFace}- />- <FileOtherFaceList- file={file}- faceIDs={annotatedFaces.otherFaceIDs}- />- </>+ {isMLEnabled() && annotatedFaces.length > 0 && (+ <FilePeopleList+ file={file}+ annotatedFaceIDs={annotatedFaces}+ onSelectFace={handleSelectFace}+ />)}</Stack>diff --git a/web/packages/new/photos/components/PeopleList.tsx b/web/packages/new/photos/components/PeopleList.tsxindex 620db2e211..d0e9ed18e4 100644--- a/web/packages/new/photos/components/PeopleList.tsx+++ b/web/packages/new/photos/components/PeopleList.tsx@@ -1,5 +1,4 @@import { useIsSmallWidth } from "@/base/hooks";-import { pt } from "@/base/i18n";import type { EnteFile } from "@/media/file";import { faceCrop, type AnnotatedFaceID } from "@/new/photos/services/ml";import type { Person, PreviewableFace } from "@/new/photos/services/ml/people";@@ -97,6 +96,7 @@ export const FilePeopleList: React.FC<FilePeopleListProps> = ({<><Typography variant="large" p={1}>{t("people")}+ {/*t("UNIDENTIFIED_FACES") TODO-Cluster remove */}</Typography><FileFaceList>{annotatedFaceIDs.map((annotatedFaceID) => (@@ -142,59 +142,6 @@ const AnnotatedFaceButton = styled(UnstyledButton)(`,);-export interface FileOtherFaceListProps {- /**- * The {@link EnteFile} whose information we are showing.- */- file: EnteFile;- /**- * The list of faces in the file that are not associated with a person.- */- faceIDs: string[];-}--/**- * Show the list of faces in the given file that are not associated with a- * specific person.- */-export const FileOtherFaceList: React.FC<FileOtherFaceListProps> = ({- file,- faceIDs,-}) => {- if (faceIDs.length == 0) return <></>;-- return (- <>- <Typography variant="large" p={1}>- {pt("Other faces")}- {/*t("UNIDENTIFIED_FACES") TODO-Cluster */}- </Typography>- <FileFaceList>- {faceIDs.map((faceID) => (- <FileOtherFace key={faceID}>- <FaceCropImageView- placeholderDimension={112}- {...{ file, faceID }}- />- </FileOtherFace>- ))}- </FileFaceList>- </>- );-};--const FileOtherFace = styled("div")`- width: 112px;- height: 112px;- margin: 5px;- border-radius: 50%;- overflow: hidden;- & > img {- width: 100%;- height: 100%;- }-`;-export interface SuggestionFaceListProps {/*** Faces, each annotated with the corresponding {@link EnteFile}, to show indiff --git a/web/packages/new/photos/services/ml/index.ts b/web/packages/new/photos/services/ml/index.tsindex 8dd21626a8..21b45f6d39 100644--- a/web/packages/new/photos/services/ml/index.ts+++ b/web/packages/new/photos/services/ml/index.ts@@ -33,7 +33,6 @@ import {reconstructPeopleSnapshot,type CGroupPerson,type PeopleSnapshot,- type Person,type PersonSuggestionUpdates,} from "./people";import { MLWorker } from "./worker";