π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
yarn prettier --write --object-wrap=collapse .
Manav Rathia3e8d3c1a3dd
diff --git a/desktop/.prettierrc.json b/desktop/.prettierrc.jsonindex 7cf8c86c77..5c2751a5f9 100644--- a/desktop/.prettierrc.json+++ b/desktop/.prettierrc.json@@ -1,6 +1,7 @@{"tabWidth": 4,"proseWrap": "always",+ "objectWrap": "collapse","plugins": ["prettier-plugin-organize-imports","prettier-plugin-packagejson"diff --git a/desktop/eslint.config.mjs b/desktop/eslint.config.mjsindex b2b2ca3b9a..29a4bf34d9 100644--- a/desktop/eslint.config.mjs+++ b/desktop/eslint.config.mjs@@ -27,23 +27,17 @@ export default ts.config(// Allow numbers to be used in template literals."@typescript-eslint/restrict-template-expressions": ["error",- {- allowNumber: true,- },+ { allowNumber: true },],// Allow void expressions as the entire body of an arrow function."@typescript-eslint/no-confusing-void-expression": ["error",- {- ignoreArrowShorthand: true,- },+ { ignoreArrowShorthand: true },],// Allow free standing ternary expressions."@typescript-eslint/no-unused-expressions": ["error",- {- allowTernary: true,- },+ { allowTernary: true },],},},diff --git a/desktop/src/main.ts b/desktop/src/main.tsindex 46aab1bfc1..9ebc14ba20 100644--- a/desktop/src/main.ts+++ b/desktop/src/main.ts@@ -247,12 +247,7 @@ const registerPrivilegedSchemes = () => {corsEnabled: true,},},- {- scheme: "stream",- privileges: {- supportFetchAPI: true,- },- },+ { scheme: "stream", privileges: { supportFetchAPI: true } },]);};diff --git a/desktop/src/main/menu.ts b/desktop/src/main/menu.tsindex d402da1516..6b007ec9fa 100644--- a/desktop/src/main/menu.ts+++ b/desktop/src/main/menu.ts@@ -36,17 +36,9 @@ export const createApplicationMenu = (mainWindow: BrowserWindow) => {{label: "Ente Photos",submenu: [- ...macOSOnly([- {- label: "About Ente",- role: "about",- },- ]),+ ...macOSOnly([{ label: "About Ente", role: "about" }]),{ type: "separator" },- {- label: "Check for Updates...",- click: handleCheckForUpdates,- },+ { label: "Check for Updates...", click: handleCheckForUpdates },{ type: "separator" },...macOSOnly([@@ -65,20 +57,11 @@ export const createApplicationMenu = (mainWindow: BrowserWindow) => {{ type: "separator" },...macOSOnly([- {- label: "Hide Ente",- role: "hide",- },- {- label: "Hide Others",- role: "hideOthers",- },+ { label: "Hide Ente", role: "hide" },+ { label: "Hide Others", role: "hideOthers" },{ type: "separator" },]),- {- label: "Quit",- role: "quit",- },+ { label: "Quit", role: "quit" },],},{@@ -96,14 +79,8 @@ export const createApplicationMenu = (mainWindow: BrowserWindow) => {{label: "Speech",submenu: [- {- role: "startSpeaking",- label: "Start Speaking",- },- {- role: "stopSpeaking",- label: "Stop Speaking",- },+ { role: "startSpeaking", label: "Start Speaking" },+ { role: "stopSpeaking", label: "Stop Speaking" },],},]),@@ -132,15 +109,7 @@ export const createApplicationMenu = (mainWindow: BrowserWindow) => {]),],},- {- label: "Help",- submenu: [- {- label: "Ente Help",- click: handleHelp,- },- ],- },+ { label: "Help", submenu: [{ label: "Ente Help", click: handleHelp }] },]);};@@ -159,13 +128,7 @@ export const createTrayContextMenu = (mainWindow: BrowserWindow) => {};return Menu.buildFromTemplate([- {- label: "Open Ente",- click: handleOpen,- },- {- label: "Quit Ente",- click: handleClose,- },+ { label: "Open Ente", click: handleOpen },+ { label: "Quit Ente", click: handleClose },]);};diff --git a/desktop/src/main/services/auto-launcher.ts b/desktop/src/main/services/auto-launcher.tsindex 351f20a38a..1ff2727068 100644--- a/desktop/src/main/services/auto-launcher.ts+++ b/desktop/src/main/services/auto-launcher.ts@@ -10,10 +10,7 @@ class AutoLauncher {constructor() {if (process.platform != "darwin") {- this.autoLaunch = new AutoLaunch({- name: "ente",- isHidden: true,- });+ this.autoLaunch = new AutoLaunch({ name: "ente", isHidden: true });}}diff --git a/desktop/src/main/services/ml-worker.ts b/desktop/src/main/services/ml-worker.tsindex 15f6f05c8b..3dd12a8003 100644--- a/desktop/src/main/services/ml-worker.ts+++ b/desktop/src/main/services/ml-worker.ts@@ -247,9 +247,7 @@ export const computeCLIPImageEmbedding = async () => {const session = await cachedCLIPImageSession();const inputArray = new Uint8Array(input.buffer);- const feeds = {- input: new ort.Tensor("uint8", inputArray, inputShape),- };+ const feeds = { input: new ort.Tensor("uint8", inputArray, inputShape) };const t = Date.now();const results = await session.run(feeds);log.debugString(`ONNX/CLIP image embedding took ${Date.now() - t} ms`);@@ -292,9 +290,7 @@ export const computeCLIPTextEmbeddingIfAvailable = async (text: string) => {const session = sessionOrSkip;const tokenizer = getTokenizer();const tokenizedText = Int32Array.from(tokenizer.encodeForCLIP(text));- const feeds = {- input: new ort.Tensor("int32", tokenizedText, [1, 77]),- };+ const feeds = { input: new ort.Tensor("int32", tokenizedText, [1, 77]) };const t = Date.now();const results = await session.run(feeds);@@ -316,9 +312,7 @@ export const detectFaces = async () => {const session = await cachedFaceDetectionSession();const inputArray = new Uint8Array(input.buffer);- const feeds = {- input: new ort.Tensor("uint8", inputArray, inputShape),- };+ const feeds = { input: new ort.Tensor("uint8", inputArray, inputShape) };const t = Date.now();const results = await session.run(feeds);log.debugString(`ONNX/YOLO face detection took ${Date.now() - t} ms`);diff --git a/desktop/src/main/services/upload.ts b/desktop/src/main/services/upload.tsindex a7e3fc8671..4c20529da4 100644--- a/desktop/src/main/services/upload.ts+++ b/desktop/src/main/services/upload.ts@@ -84,11 +84,7 @@ export const pendingUploads = async (): Promise<PendingUploads | undefined> => {if (filePaths.length == 0 && zipItems.length == 0) return undefined;- return {- collectionName,- filePaths,- zipItems,- };+ return { collectionName, filePaths, zipItems };};/**diff --git a/desktop/src/main/stores/safe-storage.ts b/desktop/src/main/stores/safe-storage.tsindex 040af1f3ed..e2af2900a5 100644--- a/desktop/src/main/stores/safe-storage.ts+++ b/desktop/src/main/stores/safe-storage.ts@@ -5,9 +5,7 @@ interface SafeStorageStore {}const safeStorageSchema: Schema<SafeStorageStore> = {- encryptionKey: {- type: "string",- },+ encryptionKey: { type: "string" },};export const safeStorageStore = new Store({diff --git a/desktop/src/main/stores/upload-status.ts b/desktop/src/main/stores/upload-status.tsindex 8cb2410df6..09b3889cca 100644--- a/desktop/src/main/stores/upload-status.ts+++ b/desktop/src/main/stores/upload-status.ts@@ -22,30 +22,13 @@ export interface UploadStatusStore {}const uploadStatusSchema: Schema<UploadStatusStore> = {- collectionName: {- type: "string",- },- filePaths: {- type: "array",- items: {- type: "string",- },- },+ collectionName: { type: "string" },+ filePaths: { type: "array", items: { type: "string" } },zipItems: {type: "array",- items: {- type: "array",- items: {- type: "string",- },- },- },- zipPaths: {- type: "array",- items: {- type: "string",- },+ items: { type: "array", items: { type: "string" } },},+ zipPaths: { type: "array", items: { type: "string" } },};export const uploadStatusStore = new Store({diff --git a/desktop/src/main/stores/user-preferences.ts b/desktop/src/main/stores/user-preferences.tsindex 400e8f6833..52aeef2dbc 100644--- a/desktop/src/main/stores/user-preferences.ts+++ b/desktop/src/main/stores/user-preferences.ts@@ -23,12 +23,7 @@ interface UserPreferences {* the app is not maximized (when the app was maximized when it was being* quit then {@link isWindowMaximized} will be set instead).*/- windowBounds?: {- x: number;- y: number;- width: number;- height: number;- };+ windowBounds?: { x: number; y: number; width: number; height: number };/*** `true` if the app's main window is maximized the last time it was closed.*/diff --git a/desktop/src/main/stores/watch.ts b/desktop/src/main/stores/watch.tsindex 891f58cd4d..768b9b71a8 100644--- a/desktop/src/main/stores/watch.ts+++ b/desktop/src/main/stores/watch.ts@@ -34,10 +34,7 @@ const watchStoreSchema: Schema<WatchStore> = {},},},- ignoredFiles: {- type: "array",- items: { type: "string" },- },+ ignoredFiles: { type: "array", items: { type: "string" } },},},},