Chip away

This commit is contained in:
Manav Rathi 2024-05-24 18:20:40 +05:30
parent 3b8c48e92d
commit 2cd1dfd720
No known key found for this signature in database
102 changed files with 186 additions and 206 deletions

View file

@ -6,7 +6,7 @@ import { accountLogout } from "@ente/accounts/services/logout";
import { APPS, APP_TITLES } from "@ente/shared/apps/constants"; import { APPS, APP_TITLES } from "@ente/shared/apps/constants";
import { Overlay } from "@ente/shared/components/Container"; import { Overlay } from "@ente/shared/components/Container";
import DialogBoxV2 from "@ente/shared/components/DialogBoxV2"; import DialogBoxV2 from "@ente/shared/components/DialogBoxV2";
import { import type {
DialogBoxAttributesV2, DialogBoxAttributesV2,
SetDialogBoxAttributesV2, SetDialogBoxAttributesV2,
} from "@ente/shared/components/DialogBoxV2/types"; } from "@ente/shared/components/DialogBoxV2/types";

View file

@ -9,14 +9,8 @@ import { t } from "i18next";
import _sodium from "libsodium-wrappers"; import _sodium from "libsodium-wrappers";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import { AppContext } from "pages/_app"; import { AppContext } from "pages/_app";
import { import type { Dispatch, SetStateAction } from "react";
Dispatch, import { createContext, useContext, useEffect, useState } from "react";
SetStateAction,
createContext,
useContext,
useEffect,
useState,
} from "react";
import { Passkey } from "types/passkey"; import { Passkey } from "types/passkey";
import { import {
finishPasskeyRegistration, finishPasskeyRegistration,

View file

@ -12,7 +12,7 @@ import {
} from "@ente/shared/apps/constants"; } from "@ente/shared/apps/constants";
import { Overlay } from "@ente/shared/components/Container"; import { Overlay } from "@ente/shared/components/Container";
import DialogBoxV2 from "@ente/shared/components/DialogBoxV2"; import DialogBoxV2 from "@ente/shared/components/DialogBoxV2";
import { import type {
DialogBoxAttributesV2, DialogBoxAttributesV2,
SetDialogBoxAttributesV2, SetDialogBoxAttributesV2,
} from "@ente/shared/components/DialogBoxV2/types"; } from "@ente/shared/components/DialogBoxV2/types";
@ -25,12 +25,12 @@ import HTTPService from "@ente/shared/network/HTTPService";
import { LS_KEYS, getData } from "@ente/shared/storage/localStorage"; import { LS_KEYS, getData } from "@ente/shared/storage/localStorage";
import { getTheme } from "@ente/shared/themes"; import { getTheme } from "@ente/shared/themes";
import { THEME_COLOR } from "@ente/shared/themes/constants"; import { THEME_COLOR } from "@ente/shared/themes/constants";
import { SetTheme } from "@ente/shared/themes/types"; import type { SetTheme } from "@ente/shared/themes/types";
import type { User } from "@ente/shared/user/types"; import type { User } from "@ente/shared/user/types";
import { CssBaseline, useMediaQuery } from "@mui/material"; import { CssBaseline, useMediaQuery } from "@mui/material";
import { ThemeProvider } from "@mui/material/styles"; import { ThemeProvider } from "@mui/material/styles";
import { t } from "i18next"; import { t } from "i18next";
import { AppProps } from "next/app"; import type { AppProps } from "next/app";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import { createContext, useEffect, useRef, useState } from "react"; import { createContext, useEffect, useRef, useState } from "react";
import LoadingBar from "react-top-loading-bar"; import LoadingBar from "react-top-loading-bar";

View file

@ -8,9 +8,6 @@
"jsxImportSource": "@emotion/react", "jsxImportSource": "@emotion/react",
"verbatimModuleSyntax": false,
"resolveJsonModule": false,
"strict": false, "strict": false,
/* Stricter than strict */ /* Stricter than strict */
"noImplicitReturns": false, "noImplicitReturns": false,

View file

@ -1,10 +1,10 @@
import log from "@/next/log"; import log from "@/next/log";
import DialogBoxV2 from "@ente/shared/components/DialogBoxV2"; import DialogBoxV2 from "@ente/shared/components/DialogBoxV2";
import VerifyMasterPasswordForm, { import VerifyMasterPasswordForm, {
VerifyMasterPasswordFormProps, type VerifyMasterPasswordFormProps,
} from "@ente/shared/components/VerifyMasterPasswordForm"; } from "@ente/shared/components/VerifyMasterPasswordForm";
import { LS_KEYS, getData } from "@ente/shared/storage/localStorage"; import { LS_KEYS, getData } from "@ente/shared/storage/localStorage";
import { KeyAttributes, User } from "@ente/shared/user/types"; import type { KeyAttributes, User } from "@ente/shared/user/types";
import { t } from "i18next"; import { t } from "i18next";
import { AppContext } from "pages/_app"; import { AppContext } from "pages/_app";
import { useContext, useEffect, useState } from "react"; import { useContext, useEffect, useState } from "react";

View file

@ -1,5 +1,5 @@
import { VerticallyCenteredFlex } from "@ente/shared/components/Container"; import { VerticallyCenteredFlex } from "@ente/shared/components/Container";
import { ButtonProps, Typography } from "@mui/material"; import { Typography, type ButtonProps } from "@mui/material";
interface Iprops { interface Iprops {
mainText: string; mainText: string;

View file

@ -3,7 +3,7 @@ import {
FormControlLabel, FormControlLabel,
FormGroup, FormGroup,
Typography, Typography,
TypographyProps, type TypographyProps,
} from "@mui/material"; } from "@mui/material";
interface Iprops { interface Iprops {

View file

@ -6,7 +6,7 @@ import PeopleIcon from "@mui/icons-material/People";
import { SetCollectionNamerAttributes } from "components/Collections/CollectionNamer"; import { SetCollectionNamerAttributes } from "components/Collections/CollectionNamer";
import CollectionOptions from "components/Collections/CollectionOptions"; import CollectionOptions from "components/Collections/CollectionOptions";
import { CollectionSummaryType } from "constants/collection"; import { CollectionSummaryType } from "constants/collection";
import { Dispatch, SetStateAction } from "react"; import type { Dispatch, SetStateAction } from "react";
import { Collection, CollectionSummary } from "types/collection"; import { Collection, CollectionSummary } from "types/collection";
import { SetFilesDownloadProgressAttributesCreator } from "types/gallery"; import { SetFilesDownloadProgressAttributesCreator } from "types/gallery";
import { shouldShowOptions } from "utils/collection"; import { shouldShowOptions } from "utils/collection";

View file

@ -1,6 +1,6 @@
import DialogBoxV2 from "@ente/shared/components/DialogBoxV2"; import DialogBoxV2 from "@ente/shared/components/DialogBoxV2";
import SingleInputForm, { import SingleInputForm, {
SingleInputFormProps, type SingleInputFormProps,
} from "@ente/shared/components/SingleInputForm"; } from "@ente/shared/components/SingleInputForm";
import { t } from "i18next"; import { t } from "i18next";
import React from "react"; import React from "react";

View file

@ -4,7 +4,7 @@ import DialogBoxV2 from "@ente/shared/components/DialogBoxV2";
import EnteButton from "@ente/shared/components/EnteButton"; import EnteButton from "@ente/shared/components/EnteButton";
import EnteSpinner from "@ente/shared/components/EnteSpinner"; import EnteSpinner from "@ente/shared/components/EnteSpinner";
import SingleInputForm, { import SingleInputForm, {
SingleInputFormProps, type SingleInputFormProps,
} from "@ente/shared/components/SingleInputForm"; } from "@ente/shared/components/SingleInputForm";
import { boxSeal } from "@ente/shared/crypto/internal/libsodium"; import { boxSeal } from "@ente/shared/crypto/internal/libsodium";
import castGateway from "@ente/shared/network/cast"; import castGateway from "@ente/shared/network/cast";

View file

@ -11,7 +11,8 @@ import {
import { t } from "i18next"; import { t } from "i18next";
import { AppContext } from "pages/_app"; import { AppContext } from "pages/_app";
import { GalleryContext } from "pages/gallery"; import { GalleryContext } from "pages/gallery";
import { Dispatch, SetStateAction, useContext, useRef, useState } from "react"; import type { Dispatch, SetStateAction } from "react";
import { useContext, useRef, useState } from "react";
import { Trans } from "react-i18next"; import { Trans } from "react-i18next";
import * as CollectionAPI from "services/collectionService"; import * as CollectionAPI from "services/collectionService";
import * as TrashService from "services/trashService"; import * as TrashService from "services/trashService";

View file

@ -8,7 +8,7 @@ import MenuItemDivider from "components/Menu/MenuItemDivider";
import { MenuItemGroup } from "components/Menu/MenuItemGroup"; import { MenuItemGroup } from "components/Menu/MenuItemGroup";
import MenuSectionTitle from "components/Menu/MenuSectionTitle"; import MenuSectionTitle from "components/Menu/MenuSectionTitle";
import Avatar from "components/pages/gallery/Avatar"; import Avatar from "components/pages/gallery/Avatar";
import { Formik, FormikHelpers } from "formik"; import { Formik, type FormikHelpers } from "formik";
import { t } from "i18next"; import { t } from "i18next";
import { useMemo, useState } from "react"; import { useMemo, useState } from "react";
import * as Yup from "yup"; import * as Yup from "yup";

View file

@ -1,5 +1,5 @@
import SingleInputForm, { import SingleInputForm, {
SingleInputFormProps, type SingleInputFormProps,
} from "@ente/shared/components/SingleInputForm"; } from "@ente/shared/components/SingleInputForm";
import ComlinkCryptoWorker from "@ente/shared/crypto"; import ComlinkCryptoWorker from "@ente/shared/crypto";
import { Dialog, Stack, Typography } from "@mui/material"; import { Dialog, Stack, Typography } from "@mui/material";

View file

@ -3,7 +3,7 @@ import DialogBoxV2 from "@ente/shared/components/DialogBoxV2";
import EnteButton from "@ente/shared/components/EnteButton"; import EnteButton from "@ente/shared/components/EnteButton";
import { DELETE_ACCOUNT_EMAIL } from "@ente/shared/constants/urls"; import { DELETE_ACCOUNT_EMAIL } from "@ente/shared/constants/urls";
import { Button, Link, Stack } from "@mui/material"; import { Button, Link, Stack } from "@mui/material";
import { Formik, FormikHelpers } from "formik"; import { Formik, type FormikHelpers } from "formik";
import { t } from "i18next"; import { t } from "i18next";
import { AppContext } from "pages/_app"; import { AppContext } from "pages/_app";
import { GalleryContext } from "pages/gallery"; import { GalleryContext } from "pages/gallery";

View file

@ -6,7 +6,7 @@ import {
SelectChangeEvent, SelectChangeEvent,
Stack, Stack,
Typography, Typography,
TypographyProps, type TypographyProps,
} from "@mui/material"; } from "@mui/material";
export interface DropdownOption<T> { export interface DropdownOption<T> {

View file

@ -1,5 +1,5 @@
import CircularProgress, { import CircularProgress, {
CircularProgressProps, type CircularProgressProps,
} from "@mui/material/CircularProgress"; } from "@mui/material/CircularProgress";
export default function EnteSpinner(props: CircularProgressProps) { export default function EnteSpinner(props: CircularProgressProps) {

View file

@ -4,10 +4,10 @@ import {
} from "@ente/shared/components/Container"; } from "@ente/shared/components/Container";
import { import {
Box, Box,
ButtonProps,
MenuItem, MenuItem,
Typography, Typography,
TypographyProps, type ButtonProps,
type TypographyProps,
} from "@mui/material"; } from "@mui/material";
import { CaptionedText } from "components/CaptionedText"; import { CaptionedText } from "components/CaptionedText";
import PublicShareSwitch from "components/Collections/CollectionShare/publicShare/switch"; import PublicShareSwitch from "components/Collections/CollectionShare/publicShare/switch";

View file

@ -2,7 +2,7 @@ import CloseIcon from "@mui/icons-material/Close";
import { import {
Box, Box,
Button, Button,
ButtonProps, type ButtonProps,
Snackbar, Snackbar,
Stack, Stack,
SxProps, SxProps,

View file

@ -1,6 +1,6 @@
import DialogBoxV2 from "@ente/shared/components/DialogBoxV2"; import DialogBoxV2 from "@ente/shared/components/DialogBoxV2";
import SingleInputForm, { import SingleInputForm, {
SingleInputFormProps, type SingleInputFormProps,
} from "@ente/shared/components/SingleInputForm"; } from "@ente/shared/components/SingleInputForm";
import { t } from "i18next"; import { t } from "i18next";

View file

@ -1,5 +1,5 @@
import { Button, ButtonProps, styled } from "@mui/material"; import { Button, styled, type ButtonProps } from "@mui/material";
import { CSSProperties } from "@mui/material/styles/createTypography"; import { type CSSProperties } from "@mui/material/styles/createTypography";
export const MapButton = styled((props: ButtonProps) => ( export const MapButton = styled((props: ButtonProps) => (
<Button color="secondary" {...props} /> <Button color="secondary" {...props} />

View file

@ -3,7 +3,7 @@ import { EnteMenuItem } from "components/Menu/EnteMenuItem";
import { MenuItemGroup } from "components/Menu/MenuItemGroup"; import { MenuItemGroup } from "components/Menu/MenuItemGroup";
import MenuSectionTitle from "components/Menu/MenuSectionTitle"; import MenuSectionTitle from "components/Menu/MenuSectionTitle";
import { t } from "i18next"; import { t } from "i18next";
import { Dispatch, SetStateAction } from "react"; import type { Dispatch, SetStateAction } from "react";
interface IProps { interface IProps {
brightness: number; brightness: number;

View file

@ -31,16 +31,8 @@ import MenuSectionTitle from "components/Menu/MenuSectionTitle";
import { CORNER_THRESHOLD, FILTER_DEFAULT_VALUES } from "constants/photoEditor"; import { CORNER_THRESHOLD, FILTER_DEFAULT_VALUES } from "constants/photoEditor";
import { t } from "i18next"; import { t } from "i18next";
import { AppContext } from "pages/_app"; import { AppContext } from "pages/_app";
import { import type { Dispatch, MutableRefObject, SetStateAction } from "react";
Dispatch, import { createContext, useContext, useEffect, useRef, useState } from "react";
MutableRefObject,
SetStateAction,
createContext,
useContext,
useEffect,
useRef,
useState,
} from "react";
import { getLocalCollections } from "services/collectionService"; import { getLocalCollections } from "services/collectionService";
import downloadManager from "services/download"; import downloadManager from "services/download";
import uploadManager from "services/upload/uploadManager"; import uploadManager from "services/upload/uploadManager";

View file

@ -1,8 +1,8 @@
import { Overlay } from "@ente/shared/components/Container"; import { Overlay } from "@ente/shared/components/Container";
import { import {
CircularProgress, CircularProgress,
CircularProgressProps,
Typography, Typography,
type CircularProgressProps,
} from "@mui/material"; } from "@mui/material";
function CircularProgressWithLabel( function CircularProgressWithLabel(

View file

@ -1,4 +1,4 @@
import { Typography, TypographyProps, styled } from "@mui/material"; import { Typography, styled, type TypographyProps } from "@mui/material";
import MuiAccordion, { AccordionProps } from "@mui/material/Accordion"; import MuiAccordion, { AccordionProps } from "@mui/material/Accordion";
import MuiAccordionDetails from "@mui/material/AccordionDetails"; import MuiAccordionDetails from "@mui/material/AccordionDetails";
import MuiAccordionSummary from "@mui/material/AccordionSummary"; import MuiAccordionSummary from "@mui/material/AccordionSummary";

View file

@ -1,5 +1,5 @@
import { ButtonProps, Link, LinkProps } from "@mui/material"; import { Link, type ButtonProps, type LinkProps } from "@mui/material";
import React, { FC } from "react"; import React from "react";
export type LinkButtonProps = React.PropsWithChildren<{ export type LinkButtonProps = React.PropsWithChildren<{
onClick: () => void; onClick: () => void;
@ -7,12 +7,9 @@ export type LinkButtonProps = React.PropsWithChildren<{
style?: React.CSSProperties; style?: React.CSSProperties;
}>; }>;
const LinkButton: FC<LinkProps<"button", { color?: ButtonProps["color"] }>> = ({ const LinkButton: React.FC<
children, LinkProps<"button", { color?: ButtonProps["color"] }>
sx, > = ({ children, sx, color, ...props }) => {
color,
...props
}) => {
return ( return (
<Link <Link
component="button" component="button"

View file

@ -18,7 +18,7 @@ import {
SetDialogBoxAttributes, SetDialogBoxAttributes,
} from "@ente/shared/components/DialogBox/types"; } from "@ente/shared/components/DialogBox/types";
import DialogBoxV2 from "@ente/shared/components/DialogBoxV2"; import DialogBoxV2 from "@ente/shared/components/DialogBoxV2";
import { import type {
DialogBoxAttributesV2, DialogBoxAttributesV2,
SetDialogBoxAttributesV2, SetDialogBoxAttributesV2,
} from "@ente/shared/components/DialogBoxV2/types"; } from "@ente/shared/components/DialogBoxV2/types";
@ -36,7 +36,7 @@ import {
} from "@ente/shared/storage/localStorage/helpers"; } from "@ente/shared/storage/localStorage/helpers";
import { getTheme } from "@ente/shared/themes"; import { getTheme } from "@ente/shared/themes";
import { THEME_COLOR } from "@ente/shared/themes/constants"; import { THEME_COLOR } from "@ente/shared/themes/constants";
import { SetTheme } from "@ente/shared/themes/types"; import type { SetTheme } from "@ente/shared/themes/types";
import type { User } from "@ente/shared/user/types"; import type { User } from "@ente/shared/user/types";
import ArrowForward from "@mui/icons-material/ArrowForward"; import ArrowForward from "@mui/icons-material/ArrowForward";
import { CssBaseline, useMediaQuery } from "@mui/material"; import { CssBaseline, useMediaQuery } from "@mui/material";
@ -45,7 +45,7 @@ import Notification from "components/Notification";
import { REDIRECTS } from "constants/redirects"; import { REDIRECTS } from "constants/redirects";
import { t } from "i18next"; import { t } from "i18next";
import isElectron from "is-electron"; import isElectron from "is-electron";
import { AppProps } from "next/app"; import type { AppProps } from "next/app";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import "photoswipe/dist/photoswipe.css"; import "photoswipe/dist/photoswipe.css";
import { createContext, useEffect, useRef, useState } from "react"; import { createContext, useEffect, useRef, useState } from "react";

View file

@ -21,7 +21,7 @@ import {
clearKeys, clearKeys,
getKey, getKey,
} from "@ente/shared/storage/sessionStorage"; } from "@ente/shared/storage/sessionStorage";
import { User } from "@ente/shared/user/types"; import type { User } from "@ente/shared/user/types";
import { isPromise } from "@ente/shared/utils"; import { isPromise } from "@ente/shared/utils";
import { Typography, styled } from "@mui/material"; import { Typography, styled } from "@mui/material";
import AuthenticateUserModal from "components/AuthenticateUserModal"; import AuthenticateUserModal from "components/AuthenticateUserModal";

View file

@ -11,7 +11,12 @@ import localForage from "@ente/shared/storage/localForage";
import { getData, LS_KEYS } from "@ente/shared/storage/localStorage"; import { getData, LS_KEYS } from "@ente/shared/storage/localStorage";
import { getToken } from "@ente/shared/storage/localStorage/helpers"; import { getToken } from "@ente/shared/storage/localStorage/helpers";
import { getKey, SESSION_KEYS } from "@ente/shared/storage/sessionStorage"; import { getKey, SESSION_KEYS } from "@ente/shared/storage/sessionStorage";
import { Button, styled, Typography, TypographyProps } from "@mui/material"; import {
Button,
styled,
Typography,
type TypographyProps,
} from "@mui/material";
import { t } from "i18next"; import { t } from "i18next";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import { CarouselProvider, DotGroup, Slide, Slider } from "pure-react-carousel"; import { CarouselProvider, DotGroup, Slide, Slider } from "pure-react-carousel";

View file

@ -11,7 +11,7 @@ import FormPaperTitle from "@ente/shared/components/Form/FormPaper/Title";
import OverflowMenu from "@ente/shared/components/OverflowMenu/menu"; import OverflowMenu from "@ente/shared/components/OverflowMenu/menu";
import { OverflowMenuOption } from "@ente/shared/components/OverflowMenu/option"; import { OverflowMenuOption } from "@ente/shared/components/OverflowMenu/option";
import SingleInputForm, { import SingleInputForm, {
SingleInputFormProps, type SingleInputFormProps,
} from "@ente/shared/components/SingleInputForm"; } from "@ente/shared/components/SingleInputForm";
import { PHOTOS_PAGES as PAGES } from "@ente/shared/constants/pages"; import { PHOTOS_PAGES as PAGES } from "@ente/shared/constants/pages";
import { ENTE_WEBSITE_LINK } from "@ente/shared/constants/urls"; import { ENTE_WEBSITE_LINK } from "@ente/shared/constants/urls";

View file

@ -8,7 +8,7 @@ import { CustomError } from "@ente/shared/error";
import HTTPService from "@ente/shared/network/HTTPService"; import HTTPService from "@ente/shared/network/HTTPService";
import { getToken } from "@ente/shared/storage/localStorage/helpers"; import { getToken } from "@ente/shared/storage/localStorage/helpers";
import { getActualKey } from "@ente/shared/user"; import { getActualKey } from "@ente/shared/user";
import { User } from "@ente/shared/user/types"; import type { User } from "@ente/shared/user/types";
import { REQUEST_BATCH_SIZE } from "constants/api"; import { REQUEST_BATCH_SIZE } from "constants/api";
import { import {
ALL_SECTION, ALL_SECTION,

View file

@ -7,7 +7,7 @@ import ComlinkCryptoWorker from "@ente/shared/crypto";
import { DedicatedCryptoWorker } from "@ente/shared/crypto/internal/crypto.worker"; import { DedicatedCryptoWorker } from "@ente/shared/crypto/internal/crypto.worker";
import { CustomError } from "@ente/shared/error"; import { CustomError } from "@ente/shared/error";
import { isPlaybackPossible } from "@ente/shared/media/video-playback"; import { isPlaybackPossible } from "@ente/shared/media/video-playback";
import { Remote } from "comlink"; import type { Remote } from "comlink";
import isElectron from "is-electron"; import isElectron from "is-electron";
import * as ffmpeg from "services/ffmpeg"; import * as ffmpeg from "services/ffmpeg";
import { EnteFile } from "types/file"; import { EnteFile } from "types/file";

View file

@ -8,7 +8,7 @@ import { CustomError } from "@ente/shared/error";
import { Events, eventBus } from "@ente/shared/events"; import { Events, eventBus } from "@ente/shared/events";
import { LS_KEYS, getData, setData } from "@ente/shared/storage/localStorage"; import { LS_KEYS, getData, setData } from "@ente/shared/storage/localStorage";
import { formatDateTimeShort } from "@ente/shared/time/format"; import { formatDateTimeShort } from "@ente/shared/time/format";
import { User } from "@ente/shared/user/types"; import type { User } from "@ente/shared/user/types";
import QueueProcessor, { import QueueProcessor, {
CancellationStatus, CancellationStatus,
RequestCanceller, RequestCanceller,

View file

@ -5,7 +5,7 @@ import { nameAndExtension } from "@/next/file";
import log from "@/next/log"; import log from "@/next/log";
import { wait } from "@/utils/promise"; import { wait } from "@/utils/promise";
import { LS_KEYS, getData } from "@ente/shared/storage/localStorage"; import { LS_KEYS, getData } from "@ente/shared/storage/localStorage";
import { User } from "@ente/shared/user/types"; import type { User } from "@ente/shared/user/types";
import { getLocalCollections } from "services/collectionService"; import { getLocalCollections } from "services/collectionService";
import downloadManager from "services/download"; import downloadManager from "services/download";
import { getAllLocalFiles } from "services/fileService"; import { getAllLocalFiles } from "services/fileService";

View file

@ -1,7 +1,7 @@
import type { Electron } from "@/next/types/ipc"; import type { Electron } from "@/next/types/ipc";
import { ComlinkWorker } from "@/next/worker/comlink-worker"; import { ComlinkWorker } from "@/next/worker/comlink-worker";
import { validateAndGetCreationUnixTimeInMicroSeconds } from "@ente/shared/time"; import { validateAndGetCreationUnixTimeInMicroSeconds } from "@ente/shared/time";
import { Remote } from "comlink"; import type { Remote } from "comlink";
import { import {
ffmpegPathPlaceholder, ffmpegPathPlaceholder,
inputPathPlaceholder, inputPathPlaceholder,

View file

@ -12,7 +12,7 @@ import { DedicatedCryptoWorker } from "@ente/shared/crypto/internal/crypto.worke
import { CustomError } from "@ente/shared/error"; import { CustomError } from "@ente/shared/error";
import { Events, eventBus } from "@ente/shared/events"; import { Events, eventBus } from "@ente/shared/events";
import { Canceler } from "axios"; import { Canceler } from "axios";
import { Remote } from "comlink"; import type { Remote } from "comlink";
import { import {
RANDOM_PERCENTAGE_PROGRESS_FOR_PUT, RANDOM_PERCENTAGE_PROGRESS_FOR_PUT,
UPLOAD_RESULT, UPLOAD_RESULT,

View file

@ -9,9 +9,9 @@ import { CustomErrorMessage } from "@/next/types/ipc";
import { ensure } from "@/utils/ensure"; import { ensure } from "@/utils/ensure";
import { ENCRYPTION_CHUNK_SIZE } from "@ente/shared/crypto/constants"; import { ENCRYPTION_CHUNK_SIZE } from "@ente/shared/crypto/constants";
import { DedicatedCryptoWorker } from "@ente/shared/crypto/internal/crypto.worker"; import { DedicatedCryptoWorker } from "@ente/shared/crypto/internal/crypto.worker";
import { B64EncryptionResult } from "@ente/shared/crypto/types"; import type { B64EncryptionResult } from "@ente/shared/crypto/types";
import { CustomError, handleUploadError } from "@ente/shared/error"; import { CustomError, handleUploadError } from "@ente/shared/error";
import { Remote } from "comlink"; import type { Remote } from "comlink";
import { import {
NULL_LOCATION, NULL_LOCATION,
RANDOM_PERCENTAGE_PROGRESS_FOR_PUT, RANDOM_PERCENTAGE_PROGRESS_FOR_PUT,

View file

@ -8,7 +8,7 @@ import {
getToken, getToken,
setLocalMapEnabled, setLocalMapEnabled,
} from "@ente/shared/storage/localStorage/helpers"; } from "@ente/shared/storage/localStorage/helpers";
import { AxiosResponse, HttpStatusCode } from "axios"; import { HttpStatusCode, type AxiosResponse } from "axios";
import { import {
DeleteChallengeResponse, DeleteChallengeResponse,
GetFeatureFlagResponse, GetFeatureFlagResponse,

View file

@ -1,4 +1,4 @@
import { User } from "@ente/shared/user/types"; import type { User } from "@ente/shared/user/types";
import { CollectionSelectorAttributes } from "components/Collections/CollectionSelector"; import { CollectionSelectorAttributes } from "components/Collections/CollectionSelector";
import { FilesDownloadProgressAttributes } from "components/FilesDownloadProgress"; import { FilesDownloadProgressAttributes } from "components/FilesDownloadProgress";
import { TimeStampListItem } from "components/PhotoList"; import { TimeStampListItem } from "components/PhotoList";

View file

@ -3,7 +3,7 @@ import { SetDialogBoxAttributes } from "@ente/shared/components/DialogBox/types"
import { LS_KEYS, getData } from "@ente/shared/storage/localStorage"; import { LS_KEYS, getData } from "@ente/shared/storage/localStorage";
import { REDIRECTS, getRedirectURL } from "constants/redirects"; import { REDIRECTS, getRedirectURL } from "constants/redirects";
import { t } from "i18next"; import { t } from "i18next";
import { NextRouter } from "next/router"; import type { NextRouter } from "next/router";
import billingService from "services/billingService"; import billingService from "services/billingService";
import { Plan, Subscription } from "types/billing"; import { Plan, Subscription } from "types/billing";
import { SetLoading } from "types/gallery"; import { SetLoading } from "types/gallery";

View file

@ -3,7 +3,7 @@ import log from "@/next/log";
import { CustomError } from "@ente/shared/error"; import { CustomError } from "@ente/shared/error";
import { LS_KEYS, getData } from "@ente/shared/storage/localStorage"; import { LS_KEYS, getData } from "@ente/shared/storage/localStorage";
import { getUnixTimeInMicroSecondsWithDelta } from "@ente/shared/time"; import { getUnixTimeInMicroSecondsWithDelta } from "@ente/shared/time";
import { User } from "@ente/shared/user/types"; import type { User } from "@ente/shared/user/types";
import bs58 from "bs58"; import bs58 from "bs58";
import { import {
ADD_TO_NOT_ALLOWED_COLLECTION, ADD_TO_NOT_ALLOWED_COLLECTION,

View file

@ -1,6 +1,6 @@
import { haveWindow } from "@/next/env"; import { haveWindow } from "@/next/env";
import { ComlinkWorker } from "@/next/worker/comlink-worker"; import { ComlinkWorker } from "@/next/worker/comlink-worker";
import { Remote } from "comlink"; import type { Remote } from "comlink";
import { type DedicatedSearchWorker } from "worker/search.worker"; import { type DedicatedSearchWorker } from "worker/search.worker";
class ComlinkSearchWorker { class ComlinkSearchWorker {

View file

@ -8,7 +8,7 @@ import { workerBridge } from "@/next/worker/worker-bridge";
import { withTimeout } from "@/utils/promise"; import { withTimeout } from "@/utils/promise";
import ComlinkCryptoWorker from "@ente/shared/crypto"; import ComlinkCryptoWorker from "@ente/shared/crypto";
import { LS_KEYS, getData } from "@ente/shared/storage/localStorage"; import { LS_KEYS, getData } from "@ente/shared/storage/localStorage";
import { User } from "@ente/shared/user/types"; import type { User } from "@ente/shared/user/types";
import { downloadUsingAnchor } from "@ente/shared/utils"; import { downloadUsingAnchor } from "@ente/shared/utils";
import { t } from "i18next"; import { t } from "i18next";
import isElectron from "is-electron"; import isElectron from "is-electron";

View file

@ -1,6 +1,6 @@
import log from "@/next/log"; import log from "@/next/log";
import { LS_KEYS, getData } from "@ente/shared/storage/localStorage"; import { LS_KEYS, getData } from "@ente/shared/storage/localStorage";
import { User } from "@ente/shared/user/types"; import type { User } from "@ente/shared/user/types";
import { FamilyData, FamilyMember } from "types/user"; import { FamilyData, FamilyMember } from "types/user";
export function getLocalFamilyData(): FamilyData { export function getLocalFamilyData(): FamilyData {

View file

@ -2,7 +2,7 @@ import log from "@/next/log";
import HTTPService from "@ente/shared/network/HTTPService"; import HTTPService from "@ente/shared/network/HTTPService";
import { getEndpoint } from "@ente/shared/network/api"; import { getEndpoint } from "@ente/shared/network/api";
import { import type {
CompleteSRPSetupRequest, CompleteSRPSetupRequest,
CompleteSRPSetupResponse, CompleteSRPSetupResponse,
CreateSRPSessionResponse, CreateSRPSessionResponse,

View file

@ -1,4 +1,4 @@
import { import type {
RecoveryKey, RecoveryKey,
TwoFactorRecoveryResponse, TwoFactorRecoveryResponse,
TwoFactorSecret, TwoFactorSecret,
@ -6,12 +6,12 @@ import {
UserVerificationResponse, UserVerificationResponse,
} from "@ente/accounts/types/user"; } from "@ente/accounts/types/user";
import { APPS, OTT_CLIENTS } from "@ente/shared/apps/constants"; import { APPS, OTT_CLIENTS } from "@ente/shared/apps/constants";
import { B64EncryptionResult } from "@ente/shared/crypto/types"; import type { B64EncryptionResult } from "@ente/shared/crypto/types";
import { ApiError, CustomError } from "@ente/shared/error"; import { ApiError, CustomError } from "@ente/shared/error";
import HTTPService from "@ente/shared/network/HTTPService"; import HTTPService from "@ente/shared/network/HTTPService";
import { getEndpoint } from "@ente/shared/network/api"; import { getEndpoint } from "@ente/shared/network/api";
import { getToken } from "@ente/shared/storage/localStorage/helpers"; import { getToken } from "@ente/shared/storage/localStorage/helpers";
import { KeyAttributes } from "@ente/shared/user/types"; import type { KeyAttributes } from "@ente/shared/user/types";
import { HttpStatusCode } from "axios"; import { HttpStatusCode } from "axios";
import { TwoFactorType } from "../constants/twofactor"; import { TwoFactorType } from "../constants/twofactor";

View file

@ -1,14 +1,14 @@
import { wait } from "@/utils/promise"; import { wait } from "@/utils/promise";
import { changeEmail, sendOTTForEmailChange } from "@ente/accounts/api/user"; import { changeEmail, sendOTTForEmailChange } from "@ente/accounts/api/user";
import { APP_HOMES } from "@ente/shared/apps/constants"; import { APP_HOMES } from "@ente/shared/apps/constants";
import { PageProps } from "@ente/shared/apps/types"; import type { PageProps } from "@ente/shared/apps/types";
import { VerticallyCentered } from "@ente/shared/components/Container"; import { VerticallyCentered } from "@ente/shared/components/Container";
import FormPaperFooter from "@ente/shared/components/Form/FormPaper/Footer"; import FormPaperFooter from "@ente/shared/components/Form/FormPaper/Footer";
import LinkButton from "@ente/shared/components/LinkButton"; import LinkButton from "@ente/shared/components/LinkButton";
import SubmitButton from "@ente/shared/components/SubmitButton"; import SubmitButton from "@ente/shared/components/SubmitButton";
import { LS_KEYS, getData, setData } from "@ente/shared/storage/localStorage"; import { LS_KEYS, getData, setData } from "@ente/shared/storage/localStorage";
import { Alert, Box, TextField } from "@mui/material"; import { Alert, Box, TextField } from "@mui/material";
import { Formik, FormikHelpers } from "formik"; import { Formik, type FormikHelpers } from "formik";
import { t } from "i18next"; import { t } from "i18next";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import { useRef, useState } from "react"; import { useRef, useState } from "react";

View file

@ -4,7 +4,7 @@ import FormPaperFooter from "@ente/shared/components/Form/FormPaper/Footer";
import FormPaperTitle from "@ente/shared/components/Form/FormPaper/Title"; import FormPaperTitle from "@ente/shared/components/Form/FormPaper/Title";
import LinkButton from "@ente/shared/components/LinkButton"; import LinkButton from "@ente/shared/components/LinkButton";
import SingleInputForm, { import SingleInputForm, {
SingleInputFormProps, type SingleInputFormProps,
} from "@ente/shared/components/SingleInputForm"; } from "@ente/shared/components/SingleInputForm";
import { LS_KEYS, setData } from "@ente/shared/storage/localStorage"; import { LS_KEYS, setData } from "@ente/shared/storage/localStorage";
import { Input } from "@mui/material"; import { Input } from "@mui/material";

View file

@ -34,9 +34,9 @@ import {
Tooltip, Tooltip,
Typography, Typography,
} from "@mui/material"; } from "@mui/material";
import { Formik, FormikHelpers } from "formik"; import { Formik, type FormikHelpers } from "formik";
import { t } from "i18next"; import { t } from "i18next";
import { NextRouter } from "next/router"; import type { NextRouter } from "next/router";
import React, { useState } from "react"; import React, { useState } from "react";
import { Trans } from "react-i18next"; import { Trans } from "react-i18next";
import * as Yup from "yup"; import * as Yup from "yup";

View file

@ -1,7 +1,7 @@
import { Typography, TypographyProps } from "@mui/material"; import { Typography, type TypographyProps } from "@mui/material";
import { FC } from "react"; import React from "react";
const InvalidInputMessage: FC<TypographyProps> = (props) => { const InvalidInputMessage: React.FC<TypographyProps> = (props) => {
return ( return (
<Typography <Typography
variant="mini" variant="mini"

View file

@ -6,7 +6,7 @@ import {
} from "@ente/shared/components/Container"; } from "@ente/shared/components/Container";
import SubmitButton from "@ente/shared/components/SubmitButton"; import SubmitButton from "@ente/shared/components/SubmitButton";
import { Box, Typography } from "@mui/material"; import { Box, Typography } from "@mui/material";
import { Formik, FormikHelpers } from "formik"; import { Formik, type FormikHelpers } from "formik";
import { t } from "i18next"; import { t } from "i18next";
import { useRef, useState } from "react"; import { useRef, useState } from "react";
import OtpInput from "react-otp-input"; import OtpInput from "react-otp-input";

View file

@ -1,4 +1,4 @@
import { TwoFactorSecret } from "@ente/accounts/types/user"; import type { TwoFactorSecret } from "@ente/accounts/types/user";
import CodeBlock from "@ente/shared/components/CodeBlock"; import CodeBlock from "@ente/shared/components/CodeBlock";
import { Typography } from "@mui/material"; import { Typography } from "@mui/material";
import { t } from "i18next"; import { t } from "i18next";

View file

@ -1,4 +1,4 @@
import { TwoFactorSecret } from "@ente/accounts/types/user"; import type { TwoFactorSecret } from "@ente/accounts/types/user";
import EnteSpinner from "@ente/shared/components/EnteSpinner"; import EnteSpinner from "@ente/shared/components/EnteSpinner";
import { t } from "i18next"; import { t } from "i18next";

View file

@ -1,7 +1,7 @@
import SetupManualMode from "@ente/accounts/components/two-factor/setup/ManualMode"; import SetupManualMode from "@ente/accounts/components/two-factor/setup/ManualMode";
import SetupQRMode from "@ente/accounts/components/two-factor/setup/QRMode"; import SetupQRMode from "@ente/accounts/components/two-factor/setup/QRMode";
import { SetupMode } from "@ente/accounts/pages/two-factor/setup"; import { SetupMode } from "@ente/accounts/pages/two-factor/setup";
import { TwoFactorSecret } from "@ente/accounts/types/user"; import type { TwoFactorSecret } from "@ente/accounts/types/user";
import { VerticallyCentered } from "@ente/shared/components/Container"; import { VerticallyCentered } from "@ente/shared/components/Container";
import { useState } from "react"; import { useState } from "react";

View file

@ -1,6 +1,6 @@
import ChangeEmailForm from "@ente/accounts/components/ChangeEmail"; import ChangeEmailForm from "@ente/accounts/components/ChangeEmail";
import { PAGES } from "@ente/accounts/constants/pages"; import { PAGES } from "@ente/accounts/constants/pages";
import { PageProps } from "@ente/shared/apps/types"; import type { PageProps } from "@ente/shared/apps/types";
import { VerticallyCentered } from "@ente/shared/components/Container"; import { VerticallyCentered } from "@ente/shared/components/Container";
import FormPaper from "@ente/shared/components/Form/FormPaper"; import FormPaper from "@ente/shared/components/Form/FormPaper";
import FormPaperTitle from "@ente/shared/components/Form/FormPaper/Title"; import FormPaperTitle from "@ente/shared/components/Form/FormPaper/Title";

View file

@ -1,41 +1,38 @@
import { t } from "i18next"; import { startSRPSetup, updateSRPAndKeys } from "@ente/accounts/api/srp";
import { useEffect, useState } from "react"; import SetPasswordForm, {
type SetPasswordFormProps,
} from "@ente/accounts/components/SetPasswordForm";
import { PAGES } from "@ente/accounts/constants/pages";
import { import {
generateSRPClient, generateSRPClient,
generateSRPSetupAttributes, generateSRPSetupAttributes,
} from "@ente/accounts/services/srp"; } from "@ente/accounts/services/srp";
import { import type { UpdatedKey } from "@ente/accounts/types/user";
generateAndSaveIntermediateKeyAttributes,
generateLoginSubKey,
saveKeyInSessionStore,
} from "@ente/shared/crypto/helpers";
import { LS_KEYS, getData, setData } from "@ente/shared/storage/localStorage";
import { startSRPSetup, updateSRPAndKeys } from "@ente/accounts/api/srp";
import SetPasswordForm, {
SetPasswordFormProps,
} from "@ente/accounts/components/SetPasswordForm";
import { PAGES } from "@ente/accounts/constants/pages";
import { UpdatedKey } from "@ente/accounts/types/user";
import { SESSION_KEYS } from "@ente/shared/storage/sessionStorage";
import { getActualKey } from "@ente/shared/user";
import { KEK, KeyAttributes, User } from "@ente/shared/user/types";
import { import {
convertBase64ToBuffer, convertBase64ToBuffer,
convertBufferToBase64, convertBufferToBase64,
} from "@ente/accounts/utils"; } from "@ente/accounts/utils";
import { APP_HOMES } from "@ente/shared/apps/constants"; import { APP_HOMES } from "@ente/shared/apps/constants";
import { PageProps } from "@ente/shared/apps/types"; import type { PageProps } from "@ente/shared/apps/types";
import { VerticallyCentered } from "@ente/shared/components/Container"; import { VerticallyCentered } from "@ente/shared/components/Container";
import FormPaper from "@ente/shared/components/Form/FormPaper"; import FormPaper from "@ente/shared/components/Form/FormPaper";
import FormPaperFooter from "@ente/shared/components/Form/FormPaper/Footer"; import FormPaperFooter from "@ente/shared/components/Form/FormPaper/Footer";
import FormPaperTitle from "@ente/shared/components/Form/FormPaper/Title"; import FormPaperTitle from "@ente/shared/components/Form/FormPaper/Title";
import LinkButton from "@ente/shared/components/LinkButton"; import LinkButton from "@ente/shared/components/LinkButton";
import ComlinkCryptoWorker from "@ente/shared/crypto"; import ComlinkCryptoWorker from "@ente/shared/crypto";
import {
generateAndSaveIntermediateKeyAttributes,
generateLoginSubKey,
saveKeyInSessionStore,
} from "@ente/shared/crypto/helpers";
import InMemoryStore, { MS_KEYS } from "@ente/shared/storage/InMemoryStore"; import InMemoryStore, { MS_KEYS } from "@ente/shared/storage/InMemoryStore";
import { LS_KEYS, getData, setData } from "@ente/shared/storage/localStorage";
import { SESSION_KEYS } from "@ente/shared/storage/sessionStorage";
import { getActualKey } from "@ente/shared/user";
import type { KEK, KeyAttributes, User } from "@ente/shared/user/types";
import { t } from "i18next";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import { useEffect, useState } from "react";
export default function ChangePassword({ appName }: PageProps) { export default function ChangePassword({ appName }: PageProps) {
const [token, setToken] = useState<string>(); const [token, setToken] = useState<string>();

View file

@ -1,14 +1,14 @@
import { isDevBuild } from "@/next/env"; import { isDevBuild } from "@/next/env";
import log from "@/next/log"; import log from "@/next/log";
import { APP_HOMES } from "@ente/shared/apps/constants"; import { APP_HOMES } from "@ente/shared/apps/constants";
import { PageProps } from "@ente/shared/apps/types"; import type { PageProps } from "@ente/shared/apps/types";
import { VerticallyCentered } from "@ente/shared/components/Container"; import { VerticallyCentered } from "@ente/shared/components/Container";
import EnteSpinner from "@ente/shared/components/EnteSpinner"; import EnteSpinner from "@ente/shared/components/EnteSpinner";
import FormPaper from "@ente/shared/components/Form/FormPaper"; import FormPaper from "@ente/shared/components/Form/FormPaper";
import FormPaperFooter from "@ente/shared/components/Form/FormPaper/Footer"; import FormPaperFooter from "@ente/shared/components/Form/FormPaper/Footer";
import LinkButton from "@ente/shared/components/LinkButton"; import LinkButton from "@ente/shared/components/LinkButton";
import VerifyMasterPasswordForm, { import VerifyMasterPasswordForm, {
VerifyMasterPasswordFormProps, type VerifyMasterPasswordFormProps,
} from "@ente/shared/components/VerifyMasterPasswordForm"; } from "@ente/shared/components/VerifyMasterPasswordForm";
import ComlinkCryptoWorker from "@ente/shared/crypto"; import ComlinkCryptoWorker from "@ente/shared/crypto";
import { import {
@ -17,7 +17,7 @@ import {
generateLoginSubKey, generateLoginSubKey,
saveKeyInSessionStore, saveKeyInSessionStore,
} from "@ente/shared/crypto/helpers"; } from "@ente/shared/crypto/helpers";
import { B64EncryptionResult } from "@ente/shared/crypto/types"; import type { B64EncryptionResult } from "@ente/shared/crypto/types";
import { CustomError } from "@ente/shared/error"; import { CustomError } from "@ente/shared/error";
import { getAccountsURL, getEndpoint } from "@ente/shared/network/api"; import { getAccountsURL, getEndpoint } from "@ente/shared/network/api";
import InMemoryStore, { MS_KEYS } from "@ente/shared/storage/InMemoryStore"; import InMemoryStore, { MS_KEYS } from "@ente/shared/storage/InMemoryStore";
@ -38,7 +38,7 @@ import {
removeKey, removeKey,
setKey, setKey,
} from "@ente/shared/storage/sessionStorage"; } from "@ente/shared/storage/sessionStorage";
import { KeyAttributes, User } from "@ente/shared/user/types"; import type { KeyAttributes, User } from "@ente/shared/user/types";
import { Typography, styled } from "@mui/material"; import { Typography, styled } from "@mui/material";
import { t } from "i18next"; import { t } from "i18next";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
@ -50,7 +50,7 @@ import {
generateSRPSetupAttributes, generateSRPSetupAttributes,
loginViaSRP, loginViaSRP,
} from "../services/srp"; } from "../services/srp";
import { SRPAttributes } from "../types/srp"; import type { SRPAttributes } from "../types/srp";
export default function Credentials({ appContext, appName }: PageProps) { export default function Credentials({ appContext, appName }: PageProps) {
const { logout } = appContext; const { logout } = appContext;

View file

@ -14,7 +14,7 @@ import { useEffect, useState } from "react";
import SetPasswordForm from "@ente/accounts/components/SetPasswordForm"; import SetPasswordForm from "@ente/accounts/components/SetPasswordForm";
import { PAGES } from "@ente/accounts/constants/pages"; import { PAGES } from "@ente/accounts/constants/pages";
import { APP_HOMES } from "@ente/shared/apps/constants"; import { APP_HOMES } from "@ente/shared/apps/constants";
import { PageProps } from "@ente/shared/apps/types"; import type { PageProps } from "@ente/shared/apps/types";
import { VerticallyCentered } from "@ente/shared/components/Container"; import { VerticallyCentered } from "@ente/shared/components/Container";
import EnteSpinner from "@ente/shared/components/EnteSpinner"; import EnteSpinner from "@ente/shared/components/EnteSpinner";
import FormPaper from "@ente/shared/components/Form/FormPaper"; import FormPaper from "@ente/shared/components/Form/FormPaper";
@ -26,7 +26,7 @@ import {
justSignedUp, justSignedUp,
setJustSignedUp, setJustSignedUp,
} from "@ente/shared/storage/localStorage/helpers"; } from "@ente/shared/storage/localStorage/helpers";
import { KeyAttributes, User } from "@ente/shared/user/types"; import type { KeyAttributes, User } from "@ente/shared/user/types";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
export default function Generate({ appContext, appName }: PageProps) { export default function Generate({ appContext, appName }: PageProps) {

View file

@ -1,4 +1,4 @@
import { PageProps } from "@ente/shared/apps/types"; import type { PageProps } from "@ente/shared/apps/types";
import { VerticallyCentered } from "@ente/shared/components/Container"; import { VerticallyCentered } from "@ente/shared/components/Container";
import EnteSpinner from "@ente/shared/components/EnteSpinner"; import EnteSpinner from "@ente/shared/components/EnteSpinner";
import FormPaper from "@ente/shared/components/Form/FormPaper"; import FormPaper from "@ente/shared/components/Form/FormPaper";

View file

@ -2,14 +2,14 @@ import log from "@/next/log";
import { sendOtt } from "@ente/accounts/api/user"; import { sendOtt } from "@ente/accounts/api/user";
import { PAGES } from "@ente/accounts/constants/pages"; import { PAGES } from "@ente/accounts/constants/pages";
import { APP_HOMES } from "@ente/shared/apps/constants"; import { APP_HOMES } from "@ente/shared/apps/constants";
import { PageProps } from "@ente/shared/apps/types"; import type { PageProps } from "@ente/shared/apps/types";
import { VerticallyCentered } from "@ente/shared/components/Container"; import { VerticallyCentered } from "@ente/shared/components/Container";
import FormPaper from "@ente/shared/components/Form/FormPaper"; import FormPaper from "@ente/shared/components/Form/FormPaper";
import FormPaperFooter from "@ente/shared/components/Form/FormPaper/Footer"; import FormPaperFooter from "@ente/shared/components/Form/FormPaper/Footer";
import FormPaperTitle from "@ente/shared/components/Form/FormPaper/Title"; import FormPaperTitle from "@ente/shared/components/Form/FormPaper/Title";
import LinkButton from "@ente/shared/components/LinkButton"; import LinkButton from "@ente/shared/components/LinkButton";
import SingleInputForm, { import SingleInputForm, {
SingleInputFormProps, type SingleInputFormProps,
} from "@ente/shared/components/SingleInputForm"; } from "@ente/shared/components/SingleInputForm";
import ComlinkCryptoWorker from "@ente/shared/crypto"; import ComlinkCryptoWorker from "@ente/shared/crypto";
import { import {
@ -19,7 +19,7 @@ import {
import InMemoryStore, { MS_KEYS } from "@ente/shared/storage/InMemoryStore"; import InMemoryStore, { MS_KEYS } from "@ente/shared/storage/InMemoryStore";
import { LS_KEYS, getData, setData } from "@ente/shared/storage/localStorage"; import { LS_KEYS, getData, setData } from "@ente/shared/storage/localStorage";
import { SESSION_KEYS, getKey } from "@ente/shared/storage/sessionStorage"; import { SESSION_KEYS, getKey } from "@ente/shared/storage/sessionStorage";
import { KeyAttributes, User } from "@ente/shared/user/types"; import type { KeyAttributes, User } from "@ente/shared/user/types";
import { t } from "i18next"; import { t } from "i18next";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";

View file

@ -1,7 +1,7 @@
import SignUp from "@ente/accounts/components/SignUp"; import SignUp from "@ente/accounts/components/SignUp";
import { PAGES } from "@ente/accounts/constants/pages"; import { PAGES } from "@ente/accounts/constants/pages";
import { LS_KEYS, getData } from "@ente/shared//storage/localStorage"; import { LS_KEYS, getData } from "@ente/shared//storage/localStorage";
import { PageProps } from "@ente/shared/apps/types"; import type { PageProps } from "@ente/shared/apps/types";
import { VerticallyCentered } from "@ente/shared/components/Container"; import { VerticallyCentered } from "@ente/shared/components/Container";
import EnteSpinner from "@ente/shared/components/EnteSpinner"; import EnteSpinner from "@ente/shared/components/EnteSpinner";
import FormPaper from "@ente/shared/components/Form/FormPaper"; import FormPaper from "@ente/shared/components/Form/FormPaper";

View file

@ -2,19 +2,19 @@ import log from "@/next/log";
import { recoverTwoFactor, removeTwoFactor } from "@ente/accounts/api/user"; import { recoverTwoFactor, removeTwoFactor } from "@ente/accounts/api/user";
import { PAGES } from "@ente/accounts/constants/pages"; import { PAGES } from "@ente/accounts/constants/pages";
import { TwoFactorType } from "@ente/accounts/constants/twofactor"; import { TwoFactorType } from "@ente/accounts/constants/twofactor";
import { PageProps } from "@ente/shared/apps/types"; import type { PageProps } from "@ente/shared/apps/types";
import { VerticallyCentered } from "@ente/shared/components/Container"; import { VerticallyCentered } from "@ente/shared/components/Container";
import { DialogBoxAttributesV2 } from "@ente/shared/components/DialogBoxV2/types"; import type { DialogBoxAttributesV2 } from "@ente/shared/components/DialogBoxV2/types";
import FormPaper from "@ente/shared/components/Form/FormPaper"; import FormPaper from "@ente/shared/components/Form/FormPaper";
import FormPaperFooter from "@ente/shared/components/Form/FormPaper/Footer"; import FormPaperFooter from "@ente/shared/components/Form/FormPaper/Footer";
import FormPaperTitle from "@ente/shared/components/Form/FormPaper/Title"; import FormPaperTitle from "@ente/shared/components/Form/FormPaper/Title";
import LinkButton from "@ente/shared/components/LinkButton"; import LinkButton from "@ente/shared/components/LinkButton";
import SingleInputForm, { import SingleInputForm, {
SingleInputFormProps, type SingleInputFormProps,
} from "@ente/shared/components/SingleInputForm"; } from "@ente/shared/components/SingleInputForm";
import { SUPPORT_EMAIL } from "@ente/shared/constants/urls"; import { SUPPORT_EMAIL } from "@ente/shared/constants/urls";
import ComlinkCryptoWorker from "@ente/shared/crypto"; import ComlinkCryptoWorker from "@ente/shared/crypto";
import { B64EncryptionResult } from "@ente/shared/crypto/types"; import type { B64EncryptionResult } from "@ente/shared/crypto/types";
import { ApiError } from "@ente/shared/error"; import { ApiError } from "@ente/shared/error";
import { LS_KEYS, getData, setData } from "@ente/shared/storage/localStorage"; import { LS_KEYS, getData, setData } from "@ente/shared/storage/localStorage";
import { Link } from "@mui/material"; import { Link } from "@mui/material";

View file

@ -1,12 +1,12 @@
import log from "@/next/log"; import log from "@/next/log";
import { enableTwoFactor, setupTwoFactor } from "@ente/accounts/api/user"; import { enableTwoFactor, setupTwoFactor } from "@ente/accounts/api/user";
import VerifyTwoFactor, { import VerifyTwoFactor, {
VerifyTwoFactorCallback, type VerifyTwoFactorCallback,
} from "@ente/accounts/components/two-factor/VerifyForm"; } from "@ente/accounts/components/two-factor/VerifyForm";
import { TwoFactorSetup } from "@ente/accounts/components/two-factor/setup"; import { TwoFactorSetup } from "@ente/accounts/components/two-factor/setup";
import { TwoFactorSecret } from "@ente/accounts/types/user"; import type { TwoFactorSecret } from "@ente/accounts/types/user";
import { APP_HOMES } from "@ente/shared/apps/constants"; import { APP_HOMES } from "@ente/shared/apps/constants";
import { PageProps } from "@ente/shared/apps/types"; import type { PageProps } from "@ente/shared/apps/types";
import { VerticallyCentered } from "@ente/shared/components/Container"; import { VerticallyCentered } from "@ente/shared/components/Container";
import LinkButton from "@ente/shared/components/LinkButton"; import LinkButton from "@ente/shared/components/LinkButton";
import { encryptWithRecoveryKey } from "@ente/shared/crypto/helpers"; import { encryptWithRecoveryKey } from "@ente/shared/crypto/helpers";

View file

@ -1,6 +1,6 @@
import { verifyTwoFactor } from "@ente/accounts/api/user"; import { verifyTwoFactor } from "@ente/accounts/api/user";
import VerifyTwoFactor, { import VerifyTwoFactor, {
VerifyTwoFactorCallback, type VerifyTwoFactorCallback,
} from "@ente/accounts/components/two-factor/VerifyForm"; } from "@ente/accounts/components/two-factor/VerifyForm";
import { PAGES } from "@ente/accounts/constants/pages"; import { PAGES } from "@ente/accounts/constants/pages";
@ -13,7 +13,7 @@ import LinkButton from "@ente/shared/components/LinkButton";
import { ApiError } from "@ente/shared/error"; import { ApiError } from "@ente/shared/error";
import InMemoryStore, { MS_KEYS } from "@ente/shared/storage/InMemoryStore"; import InMemoryStore, { MS_KEYS } from "@ente/shared/storage/InMemoryStore";
import { LS_KEYS, getData, setData } from "@ente/shared/storage/localStorage"; import { LS_KEYS, getData, setData } from "@ente/shared/storage/localStorage";
import { User } from "@ente/shared/user/types"; import type { User } from "@ente/shared/user/types";
import { HttpStatusCode } from "axios"; import { HttpStatusCode } from "axios";
import { t } from "i18next"; import { t } from "i18next";
import { useRouter } from "next/router"; import { useRouter } from "next/router";

View file

@ -1,9 +1,5 @@
import { t } from "i18next"; import type { UserVerificationResponse } from "@ente/accounts/types/user";
import { useEffect, useState } from "react"; import type { PageProps } from "@ente/shared/apps/types";
import { Trans } from "react-i18next";
import { UserVerificationResponse } from "@ente/accounts/types/user";
import { PageProps } from "@ente/shared/apps/types";
import { VerticallyCentered } from "@ente/shared/components/Container"; import { VerticallyCentered } from "@ente/shared/components/Container";
import EnteSpinner from "@ente/shared/components/EnteSpinner"; import EnteSpinner from "@ente/shared/components/EnteSpinner";
import FormPaper from "@ente/shared/components/Form/FormPaper"; import FormPaper from "@ente/shared/components/Form/FormPaper";
@ -11,7 +7,7 @@ import FormPaperFooter from "@ente/shared/components/Form/FormPaper/Footer";
import FormPaperTitle from "@ente/shared/components/Form/FormPaper/Title"; import FormPaperTitle from "@ente/shared/components/Form/FormPaper/Title";
import LinkButton from "@ente/shared/components/LinkButton"; import LinkButton from "@ente/shared/components/LinkButton";
import SingleInputForm, { import SingleInputForm, {
SingleInputFormProps, type SingleInputFormProps,
} from "@ente/shared/components/SingleInputForm"; } from "@ente/shared/components/SingleInputForm";
import { ApiError } from "@ente/shared/error"; import { ApiError } from "@ente/shared/error";
import { getAccountsURL } from "@ente/shared/network/api"; import { getAccountsURL } from "@ente/shared/network/api";
@ -23,14 +19,17 @@ import {
setIsFirstLogin, setIsFirstLogin,
} from "@ente/shared/storage/localStorage/helpers"; } from "@ente/shared/storage/localStorage/helpers";
import { clearKeys } from "@ente/shared/storage/sessionStorage"; import { clearKeys } from "@ente/shared/storage/sessionStorage";
import { KeyAttributes, User } from "@ente/shared/user/types"; import type { KeyAttributes, User } from "@ente/shared/user/types";
import { Box, Typography } from "@mui/material"; import { Box, Typography } from "@mui/material";
import { HttpStatusCode } from "axios"; import { HttpStatusCode } from "axios";
import { t } from "i18next";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import { useEffect, useState } from "react";
import { Trans } from "react-i18next";
import { putAttributes, sendOtt, verifyOtt } from "../api/user"; import { putAttributes, sendOtt, verifyOtt } from "../api/user";
import { PAGES } from "../constants/pages"; import { PAGES } from "../constants/pages";
import { configureSRP } from "../services/srp"; import { configureSRP } from "../services/srp";
import { SRPSetupAttributes } from "../types/srp"; import type { SRPSetupAttributes } from "../types/srp";
export default function VerifyPage({ appContext, appName }: PageProps) { export default function VerifyPage({ appContext, appName }: PageProps) {
const { logout } = appContext; const { logout } = appContext;

View file

@ -1,5 +1,5 @@
import log from "@/next/log"; import log from "@/next/log";
import { UserVerificationResponse } from "@ente/accounts/types/user"; import type { UserVerificationResponse } from "@ente/accounts/types/user";
import ComlinkCryptoWorker from "@ente/shared/crypto"; import ComlinkCryptoWorker from "@ente/shared/crypto";
import { generateLoginSubKey } from "@ente/shared/crypto/helpers"; import { generateLoginSubKey } from "@ente/shared/crypto/helpers";
import InMemoryStore, { MS_KEYS } from "@ente/shared/storage/InMemoryStore"; import InMemoryStore, { MS_KEYS } from "@ente/shared/storage/InMemoryStore";
@ -12,7 +12,7 @@ import {
startSRPSetup, startSRPSetup,
verifySRPSession, verifySRPSession,
} from "../api/srp"; } from "../api/srp";
import { SRPAttributes, SRPSetupAttributes } from "../types/srp"; import type { SRPAttributes, SRPSetupAttributes } from "../types/srp";
import { convertBase64ToBuffer, convertBufferToBase64 } from "../utils"; import { convertBase64ToBuffer, convertBufferToBase64 } from "../utils";
const SRP_PARAMS = SRP.params["4096"]; const SRP_PARAMS = SRP.params["4096"];

View file

@ -1,4 +1,4 @@
import { import type {
UpdatedKey, UpdatedKey,
UserVerificationResponse, UserVerificationResponse,
} from "@ente/accounts/types/user"; } from "@ente/accounts/types/user";

View file

@ -1,4 +1,4 @@
import { KeyAttributes } from "@ente/shared/user/types"; import type { KeyAttributes } from "@ente/shared/user/types";
export interface UserVerificationResponse { export interface UserVerificationResponse {
id: number; id: number;

View file

@ -1,8 +1,8 @@
import ComlinkCryptoWorker from "@ente/shared/crypto"; import ComlinkCryptoWorker from "@ente/shared/crypto";
import { generateLoginSubKey } from "@ente/shared/crypto/helpers"; import { generateLoginSubKey } from "@ente/shared/crypto/helpers";
import { KeyAttributes } from "@ente/shared/user/types"; import type { KeyAttributes } from "@ente/shared/user/types";
import { generateSRPSetupAttributes } from "../services/srp"; import { generateSRPSetupAttributes } from "../services/srp";
import { SRPSetupAttributes } from "../types/srp"; import type { SRPSetupAttributes } from "../types/srp";
export async function generateKeyAndSRPAttributes(passphrase: string): Promise<{ export async function generateKeyAndSRPAttributes(passphrase: string): Promise<{
keyAttributes: KeyAttributes; keyAttributes: KeyAttributes;

View file

@ -1,5 +1,5 @@
import { TwoFactorType } from "@ente/accounts/constants/twofactor"; import { TwoFactorType } from "@ente/accounts/constants/twofactor";
import { SetDialogBoxAttributesV2 } from "@ente/shared/components/DialogBoxV2/types"; import type { SetDialogBoxAttributesV2 } from "@ente/shared/components/DialogBoxV2/types";
import { APPS } from "./constants"; import { APPS } from "./constants";
export interface PageProps { export interface PageProps {

View file

@ -1,5 +1,5 @@
import { VerticallyCenteredFlex } from "@ente/shared/components/Container"; import { VerticallyCenteredFlex } from "@ente/shared/components/Container";
import { ButtonProps, Typography } from "@mui/material"; import { Typography, type ButtonProps } from "@mui/material";
interface Iprops { interface Iprops {
mainText: string; mainText: string;

View file

@ -2,9 +2,9 @@ import ContentCopyIcon from "@mui/icons-material/ContentCopy";
import DoneIcon from "@mui/icons-material/Done"; import DoneIcon from "@mui/icons-material/Done";
import { import {
IconButton, IconButton,
IconButtonProps,
SvgIconProps,
Tooltip, Tooltip,
type IconButtonProps,
type SvgIconProps,
} from "@mui/material"; } from "@mui/material";
import { t } from "i18next"; import { t } from "i18next";
import { useState } from "react"; import { useState } from "react";

View file

@ -1,6 +1,6 @@
import { FreeFlowText } from "@ente/shared/components/Container"; import { FreeFlowText } from "@ente/shared/components/Container";
import EnteSpinner from "@ente/shared/components/EnteSpinner"; import EnteSpinner from "@ente/shared/components/EnteSpinner";
import { BoxProps } from "@mui/material"; import type { BoxProps } from "@mui/material";
import React from "react"; import React from "react";
import CopyButton from "./CopyButton"; import CopyButton from "./CopyButton";
import { CodeWrapper, CopyButtonWrapper, Wrapper } from "./styledComponents"; import { CodeWrapper, CopyButtonWrapper, Wrapper } from "./styledComponents";

View file

@ -1,10 +1,10 @@
import { SpaceBetweenFlex } from "@ente/shared/components/Container"; import { SpaceBetweenFlex } from "@ente/shared/components/Container";
import CloseIcon from "@mui/icons-material/Close"; import CloseIcon from "@mui/icons-material/Close";
import { import {
DialogProps,
DialogTitle, DialogTitle,
IconButton, IconButton,
Typography, Typography,
type DialogProps,
} from "@mui/material"; } from "@mui/material";
const DialogTitleWithCloseButton = (props) => { const DialogTitleWithCloseButton = (props) => {

View file

@ -4,13 +4,13 @@ import {
Box, Box,
Button, Button,
Dialog, Dialog,
DialogProps,
Stack, Stack,
Typography, Typography,
type DialogProps,
} from "@mui/material"; } from "@mui/material";
import { t } from "i18next"; import { t } from "i18next";
import React, { useState } from "react"; import React, { useState } from "react";
import { DialogBoxAttributesV2 } from "./types"; import type { DialogBoxAttributesV2 } from "./types";
type IProps = React.PropsWithChildren< type IProps = React.PropsWithChildren<
Omit<DialogProps, "onClose"> & { Omit<DialogProps, "onClose"> & {

View file

@ -1,4 +1,4 @@
import { ButtonProps } from "@mui/material"; import type { ButtonProps } from "@mui/material";
export interface DialogBoxAttributesV2 { export interface DialogBoxAttributesV2 {
icon?: React.ReactNode; icon?: React.ReactNode;

View file

@ -1,9 +1,9 @@
import Done from "@mui/icons-material/Done"; import Done from "@mui/icons-material/Done";
import { import {
Button, Button,
ButtonProps,
CircularProgress, CircularProgress,
PaletteColor, type ButtonProps,
type PaletteColor,
} from "@mui/material"; } from "@mui/material";
interface Iprops extends ButtonProps { interface Iprops extends ButtonProps {

View file

@ -1,5 +1,5 @@
import CircularProgress, { import CircularProgress, {
CircularProgressProps, type CircularProgressProps,
} from "@mui/material/CircularProgress"; } from "@mui/material/CircularProgress";
export default function EnteSpinner(props: CircularProgressProps) { export default function EnteSpinner(props: CircularProgressProps) {

View file

@ -1,8 +1,8 @@
import { VerticallyCentered } from "@ente/shared/components/Container"; import { VerticallyCentered } from "@ente/shared/components/Container";
import { BoxProps, Divider } from "@mui/material"; import { Divider, type BoxProps } from "@mui/material";
import { FC } from "react"; import React from "react";
const FormPaperFooter: FC<BoxProps> = ({ sx, style, ...props }) => { const FormPaperFooter: React.FC<BoxProps> = ({ sx, style, ...props }) => {
return ( return (
<> <>
<Divider /> <Divider />

View file

@ -1,7 +1,7 @@
import { Typography, TypographyProps } from "@mui/material"; import { Typography, type TypographyProps } from "@mui/material";
import { FC } from "react"; import React from "react";
const FormPaperTitle: FC<TypographyProps> = ({ sx, ...props }) => { const FormPaperTitle: React.FC<TypographyProps> = ({ sx, ...props }) => {
return ( return (
<Typography variant="h2" sx={{ mb: 8, ...sx }} {...props}> <Typography variant="h2" sx={{ mb: 8, ...sx }} {...props}>
{props.children} {props.children}

View file

@ -1,5 +1,5 @@
import { ButtonProps, Link, LinkProps } from "@mui/material"; import { Link, type ButtonProps, type LinkProps } from "@mui/material";
import React, { FC } from "react"; import React from "react";
export type LinkButtonProps = React.PropsWithChildren<{ export type LinkButtonProps = React.PropsWithChildren<{
onClick: () => void; onClick: () => void;
@ -7,12 +7,9 @@ export type LinkButtonProps = React.PropsWithChildren<{
style?: React.CSSProperties; style?: React.CSSProperties;
}>; }>;
const LinkButton: FC<LinkProps<"button", { color?: ButtonProps["color"] }>> = ({ const LinkButton: React.FC<
children, LinkProps<"button", { color?: ButtonProps["color"] }>
sx, > = ({ children, sx, color, ...props }) => {
color,
...props
}) => {
return ( return (
<Link <Link
component="button" component="button"

View file

@ -7,7 +7,7 @@ import {
ButtonProps, ButtonProps,
MenuItem, MenuItem,
Typography, Typography,
TypographyProps, type TypographyProps,
} from "@mui/material"; } from "@mui/material";
import React from "react"; import React from "react";
import { CaptionedText } from "../CaptionedText"; import { CaptionedText } from "../CaptionedText";

View file

@ -1,4 +1,4 @@
import { IconButton, PaperProps, styled } from "@mui/material"; import { IconButton, styled, type PaperProps } from "@mui/material";
import Menu from "@mui/material/Menu"; import Menu from "@mui/material/Menu";
import React, { useState } from "react"; import React, { useState } from "react";
import { OverflowMenuContext } from "./context"; import { OverflowMenuContext } from "./context";

View file

@ -1,5 +1,5 @@
import { FluidContainer } from "@ente/shared/components/Container"; import { FluidContainer } from "@ente/shared/components/Container";
import { Box, ButtonProps, MenuItem, Typography } from "@mui/material"; import { Box, MenuItem, Typography, type ButtonProps } from "@mui/material";
import React, { useContext } from "react"; import React, { useContext } from "react";
import { OverflowMenuContext } from "./context"; import { OverflowMenuContext } from "./context";

View file

@ -1,4 +1,4 @@
import { PageProps } from "@ente/shared/apps/types"; import type { PageProps } from "@ente/shared/apps/types";
import CodeBlock from "@ente/shared/components/CodeBlock"; import CodeBlock from "@ente/shared/components/CodeBlock";
import DialogTitleWithCloseButton from "@ente/shared/components/DialogBox/TitleWithCloseButton"; import DialogTitleWithCloseButton from "@ente/shared/components/DialogBox/TitleWithCloseButton";
import { getRecoveryKey } from "@ente/shared/crypto/helpers"; import { getRecoveryKey } from "@ente/shared/crypto/helpers";

View file

@ -2,7 +2,7 @@ import { FlexWrapper } from "@ente/shared/components/Container";
import ShowHidePassword from "@ente/shared/components/Form/ShowHidePassword"; import ShowHidePassword from "@ente/shared/components/Form/ShowHidePassword";
import { Button, FormHelperText } from "@mui/material"; import { Button, FormHelperText } from "@mui/material";
import TextField from "@mui/material/TextField"; import TextField from "@mui/material/TextField";
import { Formik, FormikHelpers, FormikState } from "formik"; import { Formik, type FormikHelpers, type FormikState } from "formik";
import { t } from "i18next"; import { t } from "i18next";
import React, { useMemo, useState } from "react"; import React, { useMemo, useState } from "react";
import * as Yup from "yup"; import * as Yup from "yup";

View file

@ -1,6 +1,6 @@
import Done from "@mui/icons-material/Done"; import Done from "@mui/icons-material/Done";
import { Button, ButtonProps, CircularProgress } from "@mui/material"; import { Button, CircularProgress, type ButtonProps } from "@mui/material";
import { FC } from "react"; import React from "react";
export interface SubmitButtonProps { export interface SubmitButtonProps {
loading: boolean; loading: boolean;
@ -9,7 +9,7 @@ export interface SubmitButtonProps {
disabled?: boolean; disabled?: boolean;
success?: boolean; success?: boolean;
} }
const SubmitButton: FC<ButtonProps<"button", SubmitButtonProps>> = ({ const SubmitButton: React.FC<ButtonProps<"button", SubmitButtonProps>> = ({
loading, loading,
buttonText, buttonText,
disabled, disabled,

View file

@ -1,13 +1,13 @@
import log from "@/next/log"; import log from "@/next/log";
import { SRPAttributes } from "@ente/accounts/types/srp"; import type { SRPAttributes } from "@ente/accounts/types/srp";
import { ButtonProps, Input } from "@mui/material"; import { Input, type ButtonProps } from "@mui/material";
import { t } from "i18next"; import { t } from "i18next";
import SingleInputForm, { import SingleInputForm, {
SingleInputFormProps, type SingleInputFormProps,
} from "../components/SingleInputForm"; } from "../components/SingleInputForm";
import ComlinkCryptoWorker from "../crypto"; import ComlinkCryptoWorker from "../crypto";
import { CustomError } from "../error"; import { CustomError } from "../error";
import { KeyAttributes, User } from "../user/types"; import type { KeyAttributes, User } from "../user/types";
export interface VerifyMasterPasswordFormProps { export interface VerifyMasterPasswordFormProps {
user: User; user: User;

View file

@ -4,7 +4,7 @@ import { LS_KEYS, getData, setData } from "@ente/shared/storage/localStorage";
import { getToken } from "@ente/shared/storage/localStorage/helpers"; import { getToken } from "@ente/shared/storage/localStorage/helpers";
import { SESSION_KEYS, setKey } from "@ente/shared/storage/sessionStorage"; import { SESSION_KEYS, setKey } from "@ente/shared/storage/sessionStorage";
import { getActualKey } from "@ente/shared/user"; import { getActualKey } from "@ente/shared/user";
import { KeyAttributes } from "@ente/shared/user/types"; import type { KeyAttributes } from "@ente/shared/user/types";
import ComlinkCryptoWorker from "."; import ComlinkCryptoWorker from ".";
const LOGIN_SUB_KEY_LENGTH = 32; const LOGIN_SUB_KEY_LENGTH = 32;

View file

@ -1,5 +1,5 @@
import { ComlinkWorker } from "@/next/worker/comlink-worker"; import { ComlinkWorker } from "@/next/worker/comlink-worker";
import { Remote } from "comlink"; import type { Remote } from "comlink";
import { type DedicatedCryptoWorker } from "./internal/crypto.worker"; import { type DedicatedCryptoWorker } from "./internal/crypto.worker";
class ComlinkCryptoWorker { class ComlinkCryptoWorker {

View file

@ -1,6 +1,6 @@
import * as libsodium from "@ente/shared/crypto/internal/libsodium"; import * as libsodium from "@ente/shared/crypto/internal/libsodium";
import * as Comlink from "comlink"; import * as Comlink from "comlink";
import { StateAddress } from "libsodium-wrappers"; import type { StateAddress } from "libsodium-wrappers";
const textDecoder = new TextDecoder(); const textDecoder = new TextDecoder();
const textEncoder = new TextEncoder(); const textEncoder = new TextEncoder();

View file

@ -1,7 +1,7 @@
import { CustomError } from "@ente/shared/error"; import { CustomError } from "@ente/shared/error";
import sodium, { StateAddress } from "libsodium-wrappers"; import sodium, { type StateAddress } from "libsodium-wrappers";
import { ENCRYPTION_CHUNK_SIZE } from "../constants"; import { ENCRYPTION_CHUNK_SIZE } from "../constants";
import { B64EncryptionResult } from "../types"; import type { B64EncryptionResult } from "../types";
export async function decryptChaChaOneShot( export async function decryptChaChaOneShot(
data: Uint8Array, data: Uint8Array,

View file

@ -1,5 +1,6 @@
import { LS_KEYS, getData, setData } from "@ente/shared/storage/localStorage"; import { LS_KEYS, getData, setData } from "@ente/shared/storage/localStorage";
import { Dispatch, SetStateAction, useEffect, useState } from "react"; import type { Dispatch, SetStateAction } from "react";
import { useEffect, useState } from "react";
export function useLocalState<T>( export function useLocalState<T>(
key: LS_KEYS, key: LS_KEYS,

View file

@ -1,5 +1,5 @@
import log from "@/next/log"; import log from "@/next/log";
import axios, { AxiosRequestConfig, AxiosResponse } from "axios"; import axios, { type AxiosRequestConfig, type AxiosResponse } from "axios";
import { ApiError, CustomError, isApiErrorResponse } from "../error"; import { ApiError, CustomError, isApiErrorResponse } from "../error";
interface IHTTPHeaders { interface IHTTPHeaders {

View file

@ -1,4 +1,4 @@
import { FixedColors, ThemeColorsOptions } from "@mui/material"; import type { FixedColors, ThemeColorsOptions } from "@mui/material";
const darkThemeColors: Omit<ThemeColorsOptions, keyof FixedColors> = { const darkThemeColors: Omit<ThemeColorsOptions, keyof FixedColors> = {
background: { background: {

View file

@ -1,5 +1,5 @@
import { APPS } from "@ente/shared/apps/constants"; import { APPS } from "@ente/shared/apps/constants";
import { FixedColors, ThemeColorsOptions } from "@mui/material"; import type { FixedColors, ThemeColorsOptions } from "@mui/material";
export const getFixesColors = ( export const getFixesColors = (
appName: APPS, appName: APPS,

View file

@ -1,5 +1,5 @@
import { APPS } from "@ente/shared/apps/constants"; import { APPS } from "@ente/shared/apps/constants";
import { ThemeColorsOptions } from "@mui/material"; import type { ThemeColorsOptions } from "@mui/material";
import { THEME_COLOR } from "../constants"; import { THEME_COLOR } from "../constants";
import darkThemeColors from "./dark"; import darkThemeColors from "./dark";
import { getFixesColors } from "./fixed"; import { getFixesColors } from "./fixed";

View file

@ -1,4 +1,4 @@
import { FixedColors, ThemeColorsOptions } from "@mui/material"; import type { FixedColors, ThemeColorsOptions } from "@mui/material";
const lightThemeColors: Omit<ThemeColorsOptions, keyof FixedColors> = { const lightThemeColors: Omit<ThemeColorsOptions, keyof FixedColors> = {
background: { background: {

View file

@ -1,6 +1,6 @@
import { Shadow, ThemeColorsOptions } from "@mui/material"; import type { Shadow, ThemeColorsOptions } from "@mui/material";
import { Components } from "@mui/material/styles/components"; import type { Components } from "@mui/material/styles/components";
import { TypographyOptions } from "@mui/material/styles/createTypography"; import type { TypographyOptions } from "@mui/material/styles/createTypography";
export const getComponents = ( export const getComponents = (
colors: ThemeColorsOptions, colors: ThemeColorsOptions,

View file

@ -1,4 +1,4 @@
import { PaletteColor, PaletteColorOptions } from "@mui/material"; import type { PaletteColor, PaletteColorOptions } from "@mui/material";
import React from "react"; import React from "react";
declare module "@mui/material/styles" { declare module "@mui/material/styles" {

View file

@ -1,4 +1,4 @@
import { PaletteOptions, ThemeColorsOptions } from "@mui/material"; import type { PaletteOptions, ThemeColorsOptions } from "@mui/material";
import { THEME_COLOR } from "../constants"; import { THEME_COLOR } from "../constants";
export const getPallette = ( export const getPallette = (

Some files were not shown because too many files have changed in this diff Show more