This commit is contained in:
Manav Rathi 2024-04-05 20:48:23 +05:30
parent 42a59f2fb5
commit cf27f3236c
No known key found for this signature in database
12 changed files with 23 additions and 24 deletions

View file

@ -1,6 +1,6 @@
import { addLogLine } from "@ente/shared/logging";
import { promiseWithTimeout } from "@ente/shared/utils";
import { logError } from "@ente/shared/sentry";
import { promiseWithTimeout } from "@ente/shared/utils";
import QueueProcessor from "@ente/shared/utils/queueProcessor";
import { generateTempName } from "@ente/shared/utils/temp";
import { createFFmpeg, FFmpeg } from "ffmpeg-wasm";

View file

@ -111,7 +111,7 @@ type AppContextType = {
export const AppContext = createContext<AppContextType>(null);
export default function App( { Component, pageProps }: AppProps) {
export default function App({ Component, pageProps }: AppProps) {
const router = useRouter();
const [isI18nReady, setIsI18nReady] = useState<boolean>(false);
const [loading, setLoading] = useState(false);

View file

@ -1,7 +1,7 @@
import { logError } from "@ente/shared/sentry";
import { LS_KEYS, getData, setData } from "@ente/shared/storage/localStorage";
import { EnteFile } from "types/file";
import { sleep } from "@ente/shared/utils";
import { EnteFile } from "types/file";
import {
convertCollectionIDExportNameObjectToMap,
convertFileIDExportNameObjectToMap,

View file

@ -2,6 +2,7 @@ import { addLocalLog, addLogLine } from "@ente/shared/logging";
import { logError } from "@ente/shared/sentry";
import { LS_KEYS, getData } from "@ente/shared/storage/localStorage";
import { User } from "@ente/shared/user/types";
import { sleep } from "@ente/shared/utils";
import { FILE_TYPE } from "constants/file";
import { getLocalCollections } from "services/collectionService";
import downloadManager from "services/download";
@ -19,7 +20,6 @@ import {
} from "types/export";
import { EnteFile } from "types/file";
import { getNonEmptyPersonalCollections } from "utils/collection";
import { sleep } from "@ente/shared/utils";
import {
getCollectionExportPath,
getCollectionIDFromFileUID,

View file

@ -1,7 +1,7 @@
import { CustomError } from "@ente/shared/error";
import { addLogLine } from "@ente/shared/logging";
import { retryAsyncFunction } from "@ente/shared/utils";
import { logError } from "@ente/shared/sentry";
import { retryAsyncFunction } from "@ente/shared/utils";
import QueueProcessor from "@ente/shared/utils/queueProcessor";
import { convertBytesToHumanReadable } from "@ente/shared/utils/size";
import { ComlinkWorker } from "@ente/shared/worker/comlinkWorker";

View file

@ -2,6 +2,7 @@ import { DedicatedCryptoWorker } from "@ente/shared/crypto/internal/crypto.worke
import { CustomError, handleUploadError } from "@ente/shared/error";
import { addLocalLog, addLogLine } from "@ente/shared/logging";
import { logError } from "@ente/shared/sentry";
import { sleep } from "@ente/shared/utils";
import { convertBytesToHumanReadable } from "@ente/shared/utils/size";
import { Remote } from "comlink";
import { MAX_FILE_SIZE_SUPPORTED, UPLOAD_RESULT } from "constants/upload";
@ -15,7 +16,6 @@ import {
Logger,
UploadFile,
} from "types/upload";
import { sleep } from "@ente/shared/utils";
import { findMatchingExistingFiles } from "utils/upload";
import UIService from "./uiService";
import uploadCancelService from "./uploadCancelService";

View file

@ -1,10 +1,10 @@
import { addLogLine } from "@ente/shared/logging";
import { logError } from "@ente/shared/sentry";
import { promiseWithTimeout } from "@ente/shared/utils";
import QueueProcessor from "@ente/shared/utils/queueProcessor";
import { generateTempName } from "@ente/shared/utils/temp";
import { createFFmpeg, FFmpeg } from "ffmpeg-wasm";
import { getUint8ArrayView } from "services/readerService";
import { promiseWithTimeout } from "@ente/shared/utils";
const INPUT_PATH_PLACEHOLDER = "INPUT";
const FFMPEG_PLACEHOLDER = "FFMPEG";

View file

@ -1,7 +1,7 @@
import { APP_DOWNLOAD_URL } from "@ente/shared/constants/urls";
import { CustomError } from "@ente/shared/error";
import isElectron from "is-electron";
import { isPromise } from "@ente/shared/utils";
import isElectron from "is-electron";
export function checkConnectivity() {
if (navigator.onLine) {

View file

@ -10,10 +10,10 @@ import { sleep } from "@ente/shared/utils";
import { Alert, Box, TextField } from "@mui/material";
import { Formik, FormikHelpers } from "formik";
import { t } from "i18next";
import { useRouter } from "next/router";
import { useRef, useState } from "react";
import { Trans } from "react-i18next";
import * as Yup from "yup";
import { useRouter } from "next/router";
interface formValues {
email: string;

View file

@ -1,13 +1,13 @@
import { VerticallyCentered } from "@ente/shared/components/Container";
import { t } from "i18next";
import { useEffect } from "react";
import { useRouter } from "next/router";
import ChangeEmailForm from "@ente/accounts/components/ChangeEmail";
import { PAGES } from "@ente/accounts/constants/pages";
import { PageProps } from "@ente/shared/apps/types";
import { VerticallyCentered } from "@ente/shared/components/Container";
import FormPaper from "@ente/shared/components/Form/FormPaper";
import FormPaperTitle from "@ente/shared/components/Form/FormPaper/Title";
import { getData, LS_KEYS } from "@ente/shared/storage/localStorage";
import { t } from "i18next";
import { useRouter } from "next/router";
import { useEffect } from "react";
function ChangeEmailPage({ appName, appContext }: PageProps) {
const router = useRouter();

View file

@ -37,7 +37,6 @@ import ComlinkCryptoWorker from "@ente/shared/crypto";
import InMemoryStore, { MS_KEYS } from "@ente/shared/storage/InMemoryStore";
import { useRouter } from "next/router";
export default function ChangePassword({ appName }: PageProps) {
const [token, setToken] = useState<string>();
const [user, setUser] = useState<User>();

View file

@ -24,6 +24,8 @@ import { PAGES } from "../constants/pages";
import { generateSRPSetupAttributes } from "../services/srp";
import { logoutUser } from "../services/user";
import { APP_HOMES } from "@ente/shared/apps/constants";
import { PageProps } from "@ente/shared/apps/types";
import { VerticallyCentered } from "@ente/shared/components/Container";
import EnteSpinner from "@ente/shared/components/EnteSpinner";
import FormPaper from "@ente/shared/components/Form/FormPaper";
@ -33,7 +35,14 @@ import LinkButton from "@ente/shared/components/LinkButton";
import VerifyMasterPasswordForm, {
VerifyMasterPasswordFormProps,
} from "@ente/shared/components/VerifyMasterPasswordForm";
import ComlinkCryptoWorker from "@ente/shared/crypto";
import { B64EncryptionResult } from "@ente/shared/crypto/types";
import ElectronAPIs from "@ente/shared/electron";
import { CustomError } from "@ente/shared/error";
import { addLocalLog } from "@ente/shared/logging";
import { getAccountsURL } from "@ente/shared/network/api";
import { logError } from "@ente/shared/sentry";
import InMemoryStore, { MS_KEYS } from "@ente/shared/storage/InMemoryStore";
import {
getToken,
isFirstLogin,
@ -41,19 +50,10 @@ import {
} from "@ente/shared/storage/localStorage/helpers";
import { KeyAttributes, User } from "@ente/shared/user/types";
import isElectron from "is-electron";
import { useRouter } from "next/router";
import { getSRPAttributes } from "../api/srp";
import { configureSRP, loginViaSRP } from "../services/srp";
import { SRPAttributes } from "../types/srp";
import { APP_HOMES } from "@ente/shared/apps/constants";
import { PageProps } from "@ente/shared/apps/types";
import ComlinkCryptoWorker from "@ente/shared/crypto";
import { B64EncryptionResult } from "@ente/shared/crypto/types";
import ElectronAPIs from "@ente/shared/electron";
import { CustomError } from "@ente/shared/error";
import { addLocalLog } from "@ente/shared/logging";
import { logError } from "@ente/shared/sentry";
import InMemoryStore, { MS_KEYS } from "@ente/shared/storage/InMemoryStore";
import { useRouter } from "next/router";
export default function Credentials({ appContext, appName }: PageProps) {
const [srpAttributes, setSrpAttributes] = useState<SRPAttributes>();