π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Rename
Manav Rathib02600cb421f
diff --git a/web/apps/photos/src/components/Sidebar/AdvancedSettings.tsx b/web/apps/photos/src/components/Sidebar/AdvancedSettings.tsxindex 6668fef1fa..8acd58ecaa 100644--- a/web/apps/photos/src/components/Sidebar/AdvancedSettings.tsx+++ b/web/apps/photos/src/components/Sidebar/AdvancedSettings.tsx@@ -14,7 +14,7 @@ import { EnteMenuItem } from "components/Menu/EnteMenuItem";import { MenuItemGroup } from "components/Menu/MenuItemGroup";import isElectron from "is-electron";import { AppContext } from "pages/_app";-import { ClipExtractionStatus, ClipService } from "services/clipService";+import { ClipExtractionStatus, clipService } from "services/clip-service";import { formatNumber } from "utils/number/format";export default function AdvancedSettings({ open, onClose, onRootClose }) {@@ -51,8 +51,8 @@ export default function AdvancedSettings({ open, onClose, onRootClose }) {useEffect(() => {const main = async () => {- setIndexingStatus(await ClipService.getIndexingStatus());- ClipService.setOnUpdateHandler(setIndexingStatus);+ setIndexingStatus(await clipService.getIndexingStatus());+ clipService.setOnUpdateHandler(setIndexingStatus);};main();}, []);diff --git a/web/apps/photos/src/pages/gallery/index.tsx b/web/apps/photos/src/pages/gallery/index.tsxindex 69b833802b..b772771c49 100644--- a/web/apps/photos/src/pages/gallery/index.tsx+++ b/web/apps/photos/src/pages/gallery/index.tsx@@ -102,7 +102,7 @@ import {} from "constants/collection";import { SYNC_INTERVAL_IN_MICROSECONDS } from "constants/gallery";import { AppContext } from "pages/_app";-import { ClipService } from "services/clipService";+import { clipService } from "services/clip-service";import { constructUserIDToEmailMap } from "services/collectionService";import downloadManager from "services/download";import { syncEmbeddings } from "services/embeddingService";@@ -362,7 +362,7 @@ export default function Gallery() {syncWithRemote(false, true);}, SYNC_INTERVAL_IN_MICROSECONDS);if (electron) {- void ClipService.setupOnFileUploadListener();+ void clipService.setupOnFileUploadListener();electron.registerForegroundEventListener(() => {syncWithRemote(false, true);});@@ -373,7 +373,7 @@ export default function Gallery() {clearInterval(syncInterval.current);if (electron) {electron.registerForegroundEventListener(() => {});- ClipService.removeOnFileUploadListener();+ clipService.removeOnFileUploadListener();}};}, []);@@ -704,8 +704,8 @@ export default function Gallery() {await syncEntities();await syncMapEnabled();await syncEmbeddings();- if (ClipService.isPlatformSupported()) {- void ClipService.scheduleImageEmbeddingExtraction();+ if (clipService.isPlatformSupported()) {+ void clipService.scheduleImageEmbeddingExtraction();}} catch (e) {switch (e.message) {diff --git a/web/apps/photos/src/services/clipService.ts b/web/apps/photos/src/services/clip-service.tssimilarity index 99%rename from web/apps/photos/src/services/clipService.tsrename to web/apps/photos/src/services/clip-service.tsindex a51af80fdf..a2f2300d49 100644--- a/web/apps/photos/src/services/clipService.ts+++ b/web/apps/photos/src/services/clip-service.ts@@ -403,7 +403,7 @@ class ClipServiceImpl {};}-export const ClipService = new ClipServiceImpl();+export const clipService = new ClipServiceImpl();const getNonClipEmbeddingExtractedFiles = async (files: EnteFile[],diff --git a/web/apps/photos/src/services/searchService.ts b/web/apps/photos/src/services/searchService.tsindex 692b4ac843..8e0e0680ca 100644--- a/web/apps/photos/src/services/searchService.ts+++ b/web/apps/photos/src/services/searchService.ts@@ -22,7 +22,7 @@ import { getAllPeople } from "utils/machineLearning";import { getMLSyncConfig } from "utils/machineLearning/config";import { getFormattedDate } from "utils/search";import mlIDbStorage from "utils/storage/mlIDbStorage";-import { ClipService, computeClipMatchScore } from "./clipService";+import { clipService, computeClipMatchScore } from "./clip-service";import { getLocalEmbeddings } from "./embeddingService";import { getLatestEntities } from "./entityService";import locationSearchService, { City } from "./locationSearchService";@@ -305,7 +305,7 @@ async function getThingSuggestion(searchPhrase: string): Promise<Suggestion[]> {async function getClipSuggestion(searchPhrase: string): Promise<Suggestion> {try {- if (!ClipService.isPlatformSupported()) {+ if (!clipService.isPlatformSupported()) {return null;}@@ -397,7 +397,7 @@ async function searchThing(searchPhrase: string) {async function searchClip(searchPhrase: string): Promise<ClipSearchScores> {const imageEmbeddings = await getLocalEmbeddings(Model.ONNX_CLIP);- const textEmbedding = await ClipService.getTextEmbedding(searchPhrase);+ const textEmbedding = await clipService.getTextEmbedding(searchPhrase);const clipSearchResult = new Map<number, number>((await Promise.all(