π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
enable clip for windows
Abhinav21fc0185502a
diff --git a/apps/photos/src/pages/gallery/index.tsx b/apps/photos/src/pages/gallery/index.tsxindex 8be7429504..78c1025f2d 100644--- a/apps/photos/src/pages/gallery/index.tsx+++ b/apps/photos/src/pages/gallery/index.tsx@@ -722,7 +722,7 @@ export default function Gallery() {await syncTrash(collections, setTrashedFiles);await syncEntities();await syncMapEnabled();- if (await ClipService.isClipSupported()) {+ if (isElectron()) {await syncEmbeddings();void ClipService.scheduleImageEmbeddingExtraction();}diff --git a/apps/photos/src/services/clipService.ts b/apps/photos/src/services/clipService.tsindex b125ab350b..7bdd010d56 100644--- a/apps/photos/src/services/clipService.ts+++ b/apps/photos/src/services/clipService.ts@@ -49,8 +49,7 @@ class ClipServiceImpl {setupOnFileUploadListener = async () => {try {- const isClipSupported = await this.isClipSupported();- if (!isClipSupported) {+ if (!isElectron()) {return;}if (this.onFileUploadedHandler) {@@ -98,14 +97,6 @@ class ClipServiceImpl {}};- isClipSupported = async () => {- if (!isElectron()) {- return false;- }- const platform = await ElectronAPIs.getPlatform();- return platform !== 'windows';- };-setOnUpdateHandler = (handler: (status: ClipExtractionStatus) => void) => {this.onUpdateHandler = handler;handler(this.clipExtractionStatus);diff --git a/apps/photos/src/services/searchService.ts b/apps/photos/src/services/searchService.tsindex c19c786e98..18d059da33 100644--- a/apps/photos/src/services/searchService.ts+++ b/apps/photos/src/services/searchService.ts@@ -32,6 +32,7 @@ import {computeClipMatchScore,getLocalClipImageEmbeddings,} from './clipService';+import isElectron from 'is-electron';const DIGITS = new Set(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']);@@ -290,7 +291,7 @@ async function getThingSuggestion(searchPhrase: string): Promise<Suggestion[]> {}async function getClipSuggestion(searchPhrase: string): Promise<Suggestion> {- if (!(await ClipService.isClipSupported())) {+ if (!isElectron()) {return null;}const clipResults = await searchClip(searchPhrase);