π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Doc and tweak
Manav Rathi124006929fea
diff --git a/web/apps/photos/src/components/Upload.tsx b/web/apps/photos/src/components/Upload.tsxindex f53b939934..16f4c644c5 100644--- a/web/apps/photos/src/components/Upload.tsx+++ b/web/apps/photos/src/components/Upload.tsx@@ -481,7 +481,7 @@ export const Upload: React.FC<UploadProps> = ({setDesktopFilePaths([]);setDesktopZipItems([]);- // Remove hidden files (files whose names begins with a ".").+ // Filter out files whose names begins with a ".".const prunedItemAndPaths = allItemAndPaths.filter(([, p]) => !basename(p).startsWith("."),);diff --git a/web/apps/photos/src/services/watch.ts b/web/apps/photos/src/services/watch.tsindex b02155ffd1..435d22b2d7 100644--- a/web/apps/photos/src/services/watch.ts+++ b/web/apps/photos/src/services/watch.ts@@ -581,18 +581,11 @@ const deduceEvents = async (watches: FolderWatch[]): Promise<WatchEvent[]> => {*/const pathsToUpload = (paths: string[], watch: FolderWatch) =>paths- // Filter out hidden files (files whose names begins with a dot)- .filter((path) => !isHiddenFile(path))+ // Filter out files whose names begins with a dot.+ .filter((path) => !basename(path).startsWith("."))// Files that are on disk but not yet synced or ignored..filter((path) => !isSyncedOrIgnoredPath(path, watch));-/**- * Return true if the file at the given {@link path} is hidden.- *- * Hidden files are those whose names begin with a "." (dot).- */-const isHiddenFile = (path: string) => basename(path).startsWith(".");-/*** Return the paths to previously synced files that are no longer on disk and so* must be removed from the Ente collection.diff --git a/web/packages/new/photos/services/collections.ts b/web/packages/new/photos/services/collections.tsindex 457708a4a7..3df9176ae7 100644--- a/web/packages/new/photos/services/collections.ts+++ b/web/packages/new/photos/services/collections.ts@@ -33,6 +33,15 @@ export const getHiddenCollectionIDs = async (): Promise<number[]> =>export const getCollectionUpdationTime = async (): Promise<number> =>(await localForage.getItem<number>(COLLECTION_UPDATION_TIME)) ?? 0;+/**+ * Pull the latest collections from remote.+ *+ * This function uses a delta diff, pulling only changes since the timestamp+ * saved by the last pull.+ *+ * @returns The latest list of collections, reflecting both the state in our+ * local database and on remote.+ */export const pullCollections = async (): Promise<Collection[]> => {const localCollections = await savedCollections();let sinceTime = await getCollectionUpdationTime();diff --git a/web/packages/new/photos/services/dedup.ts b/web/packages/new/photos/services/dedup.tsindex 0965c184b6..0bf4f1c9ea 100644--- a/web/packages/new/photos/services/dedup.ts+++ b/web/packages/new/photos/services/dedup.ts@@ -116,7 +116,7 @@ export const deduceDuplicates = async () => {nonHiddenOwnedCollections,);- // Final all non-hidden collection files owned by the user that are in a+ // Find all non-hidden collection files owned by the user that are in a// non-hidden owned collection.const nonHiddenCollectionFiles = await getLocalFiles("normal");const filteredCollectionFiles = nonHiddenCollectionFiles.filter((f) =>diff --git a/web/packages/new/photos/services/trash.ts b/web/packages/new/photos/services/trash.tsindex e9ae8a598e..9afc472be7 100644--- a/web/packages/new/photos/services/trash.ts+++ b/web/packages/new/photos/services/trash.ts@@ -73,8 +73,8 @@ export type RemoteTrashItem = z.infer<typeof RemoteTrashItem>;* Update our locally saved data about the files and collections in trash by* pulling changes from remote.*- * This function uses a diff-based mechanism that pulls forward from the- * (persisted) latest pulled item's updated at time.+ * This function uses a delta diff, pulling only changes since the timestamp+ * saved by the last pull.** @param collections All the (non-deleted) collections that we know about* locally.