Merge branch 'main' into onnx-clip-ui
This commit is contained in:
commit
160d18320f
13
.vscode/settings.json
vendored
13
.vscode/settings.json
vendored
|
@ -1,8 +1,17 @@
|
|||
{
|
||||
"eslint.validate": [
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"javascript",
|
||||
"javascriptreact"
|
||||
],
|
||||
"prettier.singleQuote": true,
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"typescript.enablePromptUseWorkspaceTsdk": true,
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.formatOnPaste": true,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": true
|
||||
"source.fixAll": true
|
||||
},
|
||||
"typescript.enablePromptUseWorkspaceTsdk": true
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import React, { useContext, useEffect, useState } from 'react';
|
|||
import OTPDisplay from 'components/OTPDisplay';
|
||||
import { getAuthCodes } from 'services';
|
||||
import { CustomError } from '@ente/shared/error';
|
||||
import { PHOTOS_PAGES as PAGES } from '@ente/shared/constants/pages';
|
||||
import { AUTH_PAGES as PAGES } from '@ente/shared/constants/pages';
|
||||
import { useRouter } from 'next/router';
|
||||
import { AuthFooter } from 'components/AuthFooter';
|
||||
import { AppContext } from 'pages/_app';
|
||||
|
|
|
@ -384,11 +384,11 @@
|
|||
"ADDED_AS": "",
|
||||
"COLLABORATOR_RIGHTS": "",
|
||||
"REMOVE_PARTICIPANT_HEAD": "",
|
||||
"OWNER": "",
|
||||
"COLLABORATORS": "",
|
||||
"ADD_MORE": "",
|
||||
"OWNER": "Propietario",
|
||||
"COLLABORATORS": "Colaboradores",
|
||||
"ADD_MORE": "Añadir más",
|
||||
"VIEWERS": "",
|
||||
"OR_ADD_EXISTING": "",
|
||||
"OR_ADD_EXISTING": "O elige uno existente",
|
||||
"REMOVE_PARTICIPANT_MESSAGE": "",
|
||||
"NOT_FOUND": "404 - No Encontrado",
|
||||
"LINK_EXPIRED": "Enlace expirado",
|
||||
|
@ -399,7 +399,7 @@
|
|||
"LINK_PASSWORD_LOCK": "Contraseña bloqueada",
|
||||
"PUBLIC_COLLECT": "Permitir añadir fotos",
|
||||
"LINK_DEVICE_LIMIT": "Límites del dispositivo",
|
||||
"NO_DEVICE_LIMIT": "",
|
||||
"NO_DEVICE_LIMIT": "Ninguno",
|
||||
"LINK_EXPIRY": "Enlace vencio",
|
||||
"NEVER": "Nunca",
|
||||
"DISABLE_FILE_DOWNLOAD": "Deshabilitar descarga",
|
||||
|
@ -408,7 +408,7 @@
|
|||
"COPYRIGHT": "Infracciones sobre los derechos de autor de alguien que estoy autorizado a representar",
|
||||
"SHARED_USING": "Compartido usando ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"SHARING_REFERRAL_CODE": "Usa el código <strong>{{referralCode}}</strong> para obtener 10 GB gratis",
|
||||
"LIVE": "VIVO",
|
||||
"DISABLE_PASSWORD": "Desactivar contraseña",
|
||||
"DISABLE_PASSWORD_MESSAGE": "Seguro que quieres cambiar la contrasena?",
|
||||
|
@ -428,9 +428,9 @@
|
|||
"STOP_ALL_UPLOADS_MESSAGE": "¿Está seguro que desea detener todas las subidas en curso?",
|
||||
"STOP_UPLOADS_HEADER": "Detener las subidas?",
|
||||
"YES_STOP_UPLOADS": "Sí, detener las subidas",
|
||||
"STOP_DOWNLOADS_HEADER": "",
|
||||
"YES_STOP_DOWNLOADS": "",
|
||||
"STOP_ALL_DOWNLOADS_MESSAGE": "",
|
||||
"STOP_DOWNLOADS_HEADER": "¿Detener las descargas?",
|
||||
"YES_STOP_DOWNLOADS": "Sí, detener las descargas",
|
||||
"STOP_ALL_DOWNLOADS_MESSAGE": "¿Estás seguro de que quieres detener todas las descargas en curso?",
|
||||
"albums_one": "1 álbum",
|
||||
"albums_other": "{{count}} álbumes",
|
||||
"ALL_ALBUMS": "Todos los álbumes",
|
||||
|
@ -575,9 +575,9 @@
|
|||
"AUTH_NEXT": "siguiente",
|
||||
"AUTH_DOWNLOAD_MOBILE_APP": "Descarga nuestra aplicación móvil para administrar tus secretos",
|
||||
"HIDDEN": "",
|
||||
"HIDE": "",
|
||||
"UNHIDE": "",
|
||||
"UNHIDE_TO_COLLECTION": "",
|
||||
"HIDE": "Ocultar",
|
||||
"UNHIDE": "Mostrar",
|
||||
"UNHIDE_TO_COLLECTION": "Hacer visible al álbum",
|
||||
"SORT_BY": "",
|
||||
"NEWEST_FIRST": "",
|
||||
"OLDEST_FIRST": "",
|
||||
|
@ -595,7 +595,7 @@
|
|||
"NEW_YEAR": "",
|
||||
"NEW_YEAR_EVE": "",
|
||||
"IMAGE": "",
|
||||
"VIDEO": "",
|
||||
"VIDEO": "Video",
|
||||
"LIVE_PHOTO": "",
|
||||
"CONVERT": "",
|
||||
"CONFIRM_EDITOR_CLOSE_MESSAGE": "",
|
||||
|
@ -614,8 +614,8 @@
|
|||
"DOWNLOAD_EDITED": "",
|
||||
"SAVE_A_COPY_TO_ENTE": "",
|
||||
"RESTORE_ORIGINAL": "",
|
||||
"TRANSFORM": "",
|
||||
"COLORS": "",
|
||||
"TRANSFORM": "Transformar",
|
||||
"COLORS": "Colores",
|
||||
"FLIP": "",
|
||||
"ROTATION": "",
|
||||
"RESET": "",
|
||||
|
|
|
@ -224,7 +224,7 @@ export default function Credentials({
|
|||
}
|
||||
const redirectURL = InMemoryStore.get(MS_KEYS.REDIRECT_URL);
|
||||
InMemoryStore.delete(MS_KEYS.REDIRECT_URL);
|
||||
router.push(APP_HOMES.get(redirectURL ?? appName));
|
||||
router.push(redirectURL ?? APP_HOMES.get(appName));
|
||||
} catch (e) {
|
||||
logError(e, 'useMasterPassword failed');
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ export interface LimitedElectronAPIs
|
|||
| 'deleteDiskCache'
|
||||
| 'getSentryUserID'
|
||||
| 'convertToJPEG'
|
||||
| 'logToDisk'
|
||||
> {}
|
||||
|
||||
class WorkerSafeElectronServiceImpl implements LimitedElectronAPIs {
|
||||
|
@ -66,6 +67,10 @@ class WorkerSafeElectronServiceImpl implements LimitedElectronAPIs {
|
|||
await this.ready;
|
||||
return this.proxiedElectron.convertToJPEG(inputFileData, filename);
|
||||
}
|
||||
async logToDisk(message: string) {
|
||||
await this.ready;
|
||||
return this.proxiedElectron.logToDisk(message);
|
||||
}
|
||||
}
|
||||
|
||||
export const WorkerSafeElectronService = new WorkerSafeElectronServiceImpl();
|
||||
|
|
|
@ -14,6 +14,7 @@ export interface ProxiedLimitedElectronAPIs {
|
|||
inputFileData: Uint8Array,
|
||||
filename: string
|
||||
) => Promise<Uint8Array>;
|
||||
logToDisk: (message: string) => void;
|
||||
}
|
||||
export interface ProxiedWorkerLimitedCache {
|
||||
match: (
|
||||
|
@ -51,6 +52,9 @@ export class WorkerSafeElectronClient implements ProxiedLimitedElectronAPIs {
|
|||
): Promise<Uint8Array> {
|
||||
return await ElectronAPIs.convertToJPEG(inputFileData, filename);
|
||||
}
|
||||
logToDisk(message: string) {
|
||||
return ElectronAPIs.logToDisk(message);
|
||||
}
|
||||
}
|
||||
|
||||
function transformMatch(
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import isElectron from 'is-electron';
|
||||
import ElectronAPIs from '@ente/shared/electron';
|
||||
import { logError } from '@ente/shared/sentry';
|
||||
import { getAppEnv } from '../apps/env';
|
||||
import { APP_ENV } from '../apps/constants';
|
||||
import { formatLog, logWeb } from './web';
|
||||
import { WorkerSafeElectronService } from '../electron/service';
|
||||
|
||||
export const MAX_LOG_SIZE = 5 * 1024 * 1024; // 5MB
|
||||
export const MAX_LOG_LINES = 1000;
|
||||
|
@ -18,7 +18,7 @@ export function addLogLine(
|
|||
console.log(completeLog);
|
||||
}
|
||||
if (isElectron()) {
|
||||
ElectronAPIs.logToDisk(completeLog);
|
||||
WorkerSafeElectronService.logToDisk(completeLog);
|
||||
} else {
|
||||
logWeb(completeLog);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue