Fix errors
This commit is contained in:
parent
9127c48787
commit
b0fbd68d27
30 changed files with 34 additions and 23 deletions
|
@ -1,3 +1,4 @@
|
|||
import log from "@/next/log";
|
||||
import { logoutUser } from "@ente/accounts/services/user";
|
||||
import DialogBoxV2 from "@ente/shared/components/DialogBoxV2";
|
||||
import EnteButton from "@ente/shared/components/EnteButton";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import log from "@/next/log";
|
||||
import { Box, DialogProps, Typography } from "@mui/material";
|
||||
import { EnteDrawer } from "components/EnteDrawer";
|
||||
import { t } from "i18next";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import log from "@/next/log";
|
||||
import { FlexWrapper } from "@ente/shared/components/Container";
|
||||
import { formatDate, formatTime } from "@ente/shared/time/format";
|
||||
import CalendarTodayIcon from "@mui/icons-material/CalendarToday";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import log from "@/next/log";
|
||||
import { FlexWrapper } from "@ente/shared/components/Container";
|
||||
import PhotoOutlined from "@mui/icons-material/PhotoOutlined";
|
||||
import VideocamOutlined from "@mui/icons-material/VideocamOutlined";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import log from "@/next/log";
|
||||
import {
|
||||
Backdrop,
|
||||
Box,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import log from "@/next/log";
|
||||
import ChevronRight from "@mui/icons-material/ChevronRight";
|
||||
import ScienceIcon from "@mui/icons-material/Science";
|
||||
import { Box, DialogProps, Stack, Typography } from "@mui/material";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import log from "@/next/log";
|
||||
import RecoveryKey from "@ente/shared/components/RecoveryKey";
|
||||
import {
|
||||
ACCOUNTS_PAGES,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import log from "@/next/log";
|
||||
import type { Electron } from "@/next/types/ipc";
|
||||
import { CustomError } from "@ente/shared/error";
|
||||
import { isPromise } from "@ente/shared/utils";
|
||||
import DiscFullIcon from "@mui/icons-material/DiscFull";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import log from "@/next/log";
|
||||
import { SUPPORT_EMAIL } from "@ente/shared/constants/urls";
|
||||
import { useLocalState } from "@ente/shared/hooks/useLocalState";
|
||||
import { LS_KEYS } from "@ente/shared/storage/localStorage";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import log from "@/next/log";
|
||||
import { Overlay } from "@ente/shared/components/Container";
|
||||
import { CustomError } from "@ente/shared/error";
|
||||
import useLongPress from "@ente/shared/hooks/useLongPress";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import log from "@/next/log";
|
||||
import Login from "@ente/accounts/components/Login";
|
||||
import SignUp from "@ente/accounts/components/SignUp";
|
||||
import { APPS } from "@ente/shared/apps/constants";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import log from "@/next/log";
|
||||
import {
|
||||
CenteredFlex,
|
||||
SpaceBetweenFlex,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import log from "@/next/log";
|
||||
import HTTPService from "@ente/shared/network/HTTPService";
|
||||
import { getEndpoint } from "@ente/shared/network/api";
|
||||
import { getToken } from "@ente/shared/storage/localStorage/helpers";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import { ensureElectron } from "@/next/electron";
|
||||
import log from "@/next/log";
|
||||
import { CustomError } from "@ente/shared/error";
|
||||
import { Events, eventBus } from "@ente/shared/events";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import log from "@/next/log";
|
||||
import WasmHEICConverterService from "./heic-convert/service";
|
||||
|
||||
class HeicConversionService {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import log from "@/next/log";
|
||||
import { LocationTagData } from "types/entity";
|
||||
import { Location } from "types/upload";
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import log from "@/next/log";
|
||||
import { GraphModel } from "@tensorflow/tfjs-converter";
|
||||
import * as tf from "@tensorflow/tfjs-core";
|
||||
import {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import log from "@/next/log";
|
||||
import {
|
||||
DetectedFace,
|
||||
Face,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import log from "@/next/log";
|
||||
import * as tfjsConverter from "@tensorflow/tfjs-converter";
|
||||
import * as tf from "@tensorflow/tfjs-core";
|
||||
import { SCENE_DETECTION_IMAGE_SIZE } from "constants/mlConfig";
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { haveWindow } from "@/next/env";
|
||||
import log from "@/next/log";
|
||||
import { ComlinkWorker } from "@/next/worker/comlink-worker";
|
||||
import { getDedicatedCryptoWorker } from "@ente/shared/crypto";
|
||||
import { DedicatedCryptoWorker } from "@ente/shared/crypto/internal/crypto.worker";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import log from "@/next/log";
|
||||
import * as tf from "@tensorflow/tfjs-core";
|
||||
import { TFLiteModel } from "@tensorflow/tfjs-tflite";
|
||||
import { MOBILEFACENET_FACE_SIZE } from "constants/mlConfig";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import log from "@/next/log";
|
||||
import {
|
||||
DetectedObject,
|
||||
MLSyncContext,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import log from "@/next/log";
|
||||
import { Face, MLSyncContext, Person } from "types/machineLearning";
|
||||
import {
|
||||
findFirstIfSorted,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import log from "@/next/log";
|
||||
import * as tf from "@tensorflow/tfjs-core";
|
||||
import {
|
||||
ObjectDetection,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import log from "@/next/log";
|
||||
import { JobConfig, JobResult, JobState } from "types/common/job";
|
||||
|
||||
export class SimpleJob<R extends JobResult> {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import log from "@/next/log";
|
||||
import { CacheStorageService } from "@ente/shared/storage/cacheStorage";
|
||||
import { CACHES } from "@ente/shared/storage/cacheStorage/constants";
|
||||
import { getBlobFromCache } from "@ente/shared/storage/cacheStorage/helpers";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import log from "@/next/log";
|
||||
import { CACHES } from "@ente/shared/storage/cacheStorage/constants";
|
||||
import { cached } from "@ente/shared/storage/cacheStorage/helpers";
|
||||
import * as tf from "@tensorflow/tfjs-core";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import log from "@/next/log";
|
||||
import HTTPService from "@ente/shared/network/HTTPService";
|
||||
import { getEndpoint } from "@ente/shared/network/api";
|
||||
|
||||
|
|
|
@ -12,18 +12,11 @@ import {
|
|||
import React from "react";
|
||||
import { CaptionedText } from "../CaptionedText";
|
||||
import PublicShareSwitch from "../Collections/CollectionShare/publicShare/switch";
|
||||
import ChangeDirectoryOption from "../Directory/changeOption";
|
||||
|
||||
interface Iprops {
|
||||
onClick: () => void;
|
||||
color?: ButtonProps["color"];
|
||||
variant?:
|
||||
| "primary"
|
||||
| "captioned"
|
||||
| "toggle"
|
||||
| "secondary"
|
||||
| "mini"
|
||||
| "path";
|
||||
variant?: "primary" | "captioned" | "toggle" | "secondary" | "mini";
|
||||
fontWeight?: TypographyProps["fontWeight"];
|
||||
startIcon?: React.ReactNode;
|
||||
endIcon?: React.ReactNode;
|
||||
|
@ -49,14 +42,14 @@ export function EnteMenuItem({
|
|||
disabled = false,
|
||||
}: Iprops) {
|
||||
const handleButtonClick = () => {
|
||||
if (variant === "path" || variant === "toggle") {
|
||||
if (variant === "toggle") {
|
||||
return;
|
||||
}
|
||||
onClick();
|
||||
};
|
||||
|
||||
const handleIconClick = () => {
|
||||
if (variant !== "path" && variant !== "toggle") {
|
||||
if (variant !== "toggle") {
|
||||
return;
|
||||
}
|
||||
onClick();
|
||||
|
@ -116,11 +109,6 @@ export function EnteMenuItem({
|
|||
onClick={handleIconClick}
|
||||
/>
|
||||
)}
|
||||
{variant === "path" && (
|
||||
<ChangeDirectoryOption
|
||||
changeExportDirectory={handleIconClick}
|
||||
/>
|
||||
)}
|
||||
</VerticallyCenteredFlex>
|
||||
</SpaceBetweenFlex>
|
||||
</MenuItem>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import ElectronAPIs from "@/next/electron";
|
||||
import log from "@/next/log";
|
||||
import { setRecoveryKey } from "@ente/accounts/api/user";
|
||||
import { LS_KEYS, getData, setData } from "@ente/shared/storage/localStorage";
|
||||
|
@ -6,7 +5,6 @@ import { getToken } from "@ente/shared/storage/localStorage/helpers";
|
|||
import { SESSION_KEYS, setKey } from "@ente/shared/storage/sessionStorage";
|
||||
import { getActualKey } from "@ente/shared/user";
|
||||
import { KeyAttributes } from "@ente/shared/user/types";
|
||||
import isElectron from "is-electron";
|
||||
import ComlinkCryptoWorker from ".";
|
||||
|
||||
const LOGIN_SUB_KEY_LENGTH = 32;
|
||||
|
@ -103,12 +101,9 @@ export const saveKeyInSessionStore = async (
|
|||
const sessionKeyAttributes =
|
||||
await cryptoWorker.generateKeyAndEncryptToB64(key);
|
||||
setKey(keyType, sessionKeyAttributes);
|
||||
if (
|
||||
isElectron() &&
|
||||
!fromDesktop &&
|
||||
keyType === SESSION_KEYS.ENCRYPTION_KEY
|
||||
) {
|
||||
ElectronAPIs.setEncryptionKey(key);
|
||||
const electron = globalThis.electron;
|
||||
if (electron && !fromDesktop && keyType === SESSION_KEYS.ENCRYPTION_KEY) {
|
||||
electron.setEncryptionKey(key);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue