π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Fix
Manav Rathi8f0ec55e549e
diff --git a/web/apps/photos/eslint.config.mjs b/web/apps/photos/eslint.config.mjsindex f7703446ed..e938d46a9a 100644--- a/web/apps/photos/eslint.config.mjs+++ b/web/apps/photos/eslint.config.mjs@@ -24,7 +24,6 @@ export default ["@typescript-eslint/no-unsafe-enum-comparison": "off","@typescript-eslint/no-unnecessary-type-assertion": "off","@typescript-eslint/no-empty-function": "off",- "@typescript-eslint/no-unnecessary-template-expression": "off","@typescript-eslint/consistent-indexed-object-style": "off","@typescript-eslint/prefer-promise-reject-errors": "off","@typescript-eslint/no-useless-constructor": "off",@@ -34,11 +33,8 @@ export default ["@typescript-eslint/prefer-optional-chain": "off","@typescript-eslint/no-misused-promises": "off","@typescript-eslint/restrict-template-expressions": "off",- "@typescript-eslint/consistent-type-definitions": "off",- "@typescript-eslint/consistent-generic-constructors": "off","@typescript-eslint/no-inferrable-types": "off","@typescript-eslint/no-base-to-string": "off",- "@typescript-eslint/no-unnecessary-type-arguments": "off","@typescript-eslint/use-unknown-in-catch-callback-variable": "off","@typescript-eslint/restrict-plus-operands": "off","@typescript-eslint/no-unused-expressions": "off",diff --git a/web/apps/photos/src/components/Collections/CollectionShare.tsx b/web/apps/photos/src/components/Collections/CollectionShare.tsxindex 6f17ace58e..e4ea59f925 100644--- a/web/apps/photos/src/components/Collections/CollectionShare.tsx+++ b/web/apps/photos/src/components/Collections/CollectionShare.tsx@@ -1105,7 +1105,7 @@ const ManageParticipant: React.FC<ManageParticipantProps> = ({<Transi18nKey="REMOVE_PARTICIPANT_MESSAGE"values={{- selectedEmail: `${selectedParticipant.email}`,+ selectedEmail: selectedParticipant.email,}}/>),diff --git a/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx b/web/apps/photos/src/components/Upload/UploadTypeSelector.tsxindex f2f4ece69e..7bc94fabde 100644--- a/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx+++ b/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx@@ -107,7 +107,7 @@ export const UploadTypeSelector: React.FC<UploadTypeSelectorProps> = ({type OptionType = "files" | "folders" | "zips";-type OptionsProps = {+interface OptionsProps {intent: UploadTypeSelectorIntent;/** Called when the user selects one of the provided options. */onSelect: (option: OptionType) => void;diff --git a/web/apps/photos/src/pages/deduplicate.tsx b/web/apps/photos/src/pages/deduplicate.tsxindex 50bc1576d2..ce4b3b045e 100644--- a/web/apps/photos/src/pages/deduplicate.tsx+++ b/web/apps/photos/src/pages/deduplicate.tsx@@ -29,10 +29,10 @@ import { syncTrash } from "services/trashService";import { SelectedState } from "types/gallery";import { getSelectedFiles } from "utils/file";-export type DeduplicateContextType = {+export interface DeduplicateContextType {isOnDeduplicatePage: boolean;collectionNameMap: Map<number, string>;-};+}export const DeduplicateContext = createContext<DeduplicateContextType>({isOnDeduplicatePage: false,diff --git a/web/apps/photos/src/services/export/index.ts b/web/apps/photos/src/services/export/index.tsindex 5f91e6163a..ee0f6a758b 100644--- a/web/apps/photos/src/services/export/index.ts+++ b/web/apps/photos/src/services/export/index.ts@@ -966,7 +966,7 @@ class ExportService {exportDir: string,fileUID: string,collectionExportPath: string,- fileStream: ReadableStream<any>,+ fileStream: ReadableStream,file: EnteFile,) {const fs = ensureElectron().fs;diff --git a/web/apps/photos/src/services/publicCollectionService.ts b/web/apps/photos/src/services/publicCollectionService.tsindex 493f2f7deb..e5d5890792 100644--- a/web/apps/photos/src/services/publicCollectionService.ts+++ b/web/apps/photos/src/services/publicCollectionService.ts@@ -17,6 +17,8 @@ const PUBLIC_COLLECTION_FILES_TABLE = "public-collection-files";const PUBLIC_COLLECTIONS_TABLE = "public-collections";const PUBLIC_REFERRAL_CODE = "public-referral-code";+// Fix this once we can trust the types.+// eslint-disable-next-line @typescript-eslint/no-unnecessary-template-expressionexport const getPublicCollectionUID = (token: string) => `${token}`;const getPublicCollectionLastSyncTimeKey = (collectionUID: string) =>diff --git a/web/apps/photos/src/services/upload/uploadManager.ts b/web/apps/photos/src/services/upload/uploadManager.tsindex cb733f7a5c..348c468b0a 100644--- a/web/apps/photos/src/services/upload/uploadManager.ts+++ b/web/apps/photos/src/services/upload/uploadManager.ts@@ -131,7 +131,7 @@ class UIService {// UPLOAD LEVEL STATESprivate uploadPhase: UploadPhase = "preparing";- private filenames: Map<number, string> = new Map();+ private filenames = new Map<number, string>();private hasLivePhoto: boolean = false;private uploadProgressView: boolean = false;@@ -770,14 +770,14 @@ const makeUploadItemWithCollectionIDAndName = (** See: [Note: Intermediate file types during upload].*/-type ClusteredUploadItem = {+interface ClusteredUploadItem {localID: number;collectionID: number;fileName: string;isLivePhoto: boolean;uploadItem?: UploadItem;livePhotoAssets?: LivePhotoAssets;-};+}/*** The file that we hand off to the uploader. Essentiallydiff --git a/web/apps/photos/src/types/gallery/index.ts b/web/apps/photos/src/types/gallery/index.tsindex 29ff3e6d7b..dffe171cc3 100644--- a/web/apps/photos/src/types/gallery/index.ts+++ b/web/apps/photos/src/types/gallery/index.ts@@ -3,7 +3,7 @@ import type { User } from "@ente/shared/user/types";import { FilesDownloadProgressAttributes } from "components/FilesDownloadProgress";import { TimeStampListItem } from "components/PhotoList";-export type SelectedState = {+export interface SelectedState {[k: number]: boolean;ownCount: number;count: number;@@ -14,7 +14,7 @@ export type SelectedState = {* {@link collectionID} logic).*/context: SelectionContext | undefined;-};+}export type SetSelectedState = React.Dispatch<React.SetStateAction<SelectedState>>;@@ -33,12 +33,12 @@ export type SetFilesDownloadProgressAttributesCreator = (isHidden?: boolean,) => SetFilesDownloadProgressAttributes;-export type MergedSourceURL = {+export interface MergedSourceURL {original: string;converted: string;-};+}-export type GalleryContextType = {+export interface GalleryContextType {showPlanSelectorModal: () => void;setActiveCollectionID: (collectionID: number) => void;/** Newer and almost equivalent alternative to setActiveCollectionID. */@@ -55,4 +55,4 @@ export type GalleryContextType = {isClipSearchResult: boolean;setSelectedFiles: (value) => void;selectedFile: SelectedState;-};+}