Move
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { putAttributes } from "@/accounts/api/user";
|
||||
import { putAttributes } from "@/accounts/services/user";
|
||||
import log from "@/base/log";
|
||||
import { apiURL } from "@/base/origins";
|
||||
import type { UserDetails } from "@/new/photos/services/user-details";
|
||||
|
||||
@@ -9,8 +9,8 @@ import { Input, Stack, Typography } from "@mui/material";
|
||||
import { t } from "i18next";
|
||||
import { useRouter } from "next/router";
|
||||
import { getSRPAttributes } from "../api/srp";
|
||||
import { sendOtt } from "../api/user";
|
||||
import { PAGES } from "../constants/pages";
|
||||
import { sendOtt } from "../services/user";
|
||||
|
||||
interface LoginProps {
|
||||
signUp: () => void;
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
import { sendOtt } from "@/accounts/api/user";
|
||||
import { PasswordStrengthHint } from "@/accounts/components/PasswordStrength";
|
||||
import { PAGES } from "@/accounts/constants/pages";
|
||||
import { generateKeyAndSRPAttributes } from "@/accounts/services/srp";
|
||||
import { isWeakPassword } from "@/accounts/utils/password";
|
||||
import { FormPaperFooter, FormPaperTitle } from "@/base/components/FormPaper";
|
||||
import { LoadingButton } from "@/base/components/mui/LoadingButton";
|
||||
import log from "@/base/log";
|
||||
@@ -40,6 +35,11 @@ import type { NextRouter } from "next/router";
|
||||
import React, { useState } from "react";
|
||||
import { Trans } from "react-i18next";
|
||||
import * as Yup from "yup";
|
||||
import { PAGES } from "../constants/pages";
|
||||
import { generateKeyAndSRPAttributes } from "../services/srp";
|
||||
import { sendOtt } from "../services/user";
|
||||
import { isWeakPassword } from "../utils/password";
|
||||
import { PasswordStrengthHint } from "./PasswordStrength";
|
||||
|
||||
interface FormValues {
|
||||
email: string;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { changeEmail, sendOTTForEmailChange } from "@/accounts/api/user";
|
||||
import {
|
||||
FormPaper,
|
||||
FormPaperFooter,
|
||||
@@ -17,6 +16,7 @@ import { useEffect, useState } from "react";
|
||||
import { Trans } from "react-i18next";
|
||||
import * as Yup from "yup";
|
||||
import { appHomeRoute } from "../services/redirect";
|
||||
import { changeEmail, sendOTTForEmailChange } from "../services/user";
|
||||
import type { PageProps } from "../types/page";
|
||||
|
||||
const Page: React.FC<PageProps> = () => {
|
||||
|
||||
@@ -3,17 +3,12 @@ import {
|
||||
startSRPSetup,
|
||||
updateSRPAndKeys,
|
||||
} from "@/accounts/api/srp";
|
||||
import SetPasswordForm, {
|
||||
type SetPasswordFormProps,
|
||||
} from "@/accounts/components/SetPasswordForm";
|
||||
import { PAGES } from "@/accounts/constants/pages";
|
||||
import {
|
||||
convertBase64ToBuffer,
|
||||
convertBufferToBase64,
|
||||
generateSRPClient,
|
||||
generateSRPSetupAttributes,
|
||||
} from "@/accounts/services/srp";
|
||||
import type { UpdatedKey } from "@/accounts/types/user";
|
||||
import {
|
||||
FormPaper,
|
||||
FormPaperFooter,
|
||||
@@ -34,8 +29,13 @@ import type { KEK, KeyAttributes, User } from "@ente/shared/user/types";
|
||||
import { t } from "i18next";
|
||||
import { useRouter } from "next/router";
|
||||
import { useEffect, useState } from "react";
|
||||
import SetPasswordForm, {
|
||||
type SetPasswordFormProps,
|
||||
} from "../components/SetPasswordForm";
|
||||
import { PAGES } from "../constants/pages";
|
||||
import { appHomeRoute, stashRedirect } from "../services/redirect";
|
||||
import type { PageProps } from "../types/page";
|
||||
import type { UpdatedKey } from "../types/user";
|
||||
|
||||
const Page: React.FC<PageProps> = () => {
|
||||
const [token, setToken] = useState<string>();
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { putAttributes } from "@/accounts/api/user";
|
||||
import { RecoveryKey } from "@/accounts/components/RecoveryKey";
|
||||
import SetPasswordForm, {
|
||||
type SetPasswordFormProps,
|
||||
@@ -8,6 +7,7 @@ import {
|
||||
configureSRP,
|
||||
generateKeyAndSRPAttributes,
|
||||
} from "@/accounts/services/srp";
|
||||
import { putAttributes } from "@/accounts/services/user";
|
||||
import {
|
||||
FormPaper,
|
||||
FormPaperFooter,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { sendOtt } from "@/accounts/api/user";
|
||||
import { PAGES } from "@/accounts/constants/pages";
|
||||
import { sendOtt } from "@/accounts/services/user";
|
||||
import {
|
||||
FormPaper,
|
||||
FormPaperFooter,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { PAGES } from "@/accounts/constants/pages";
|
||||
import {
|
||||
recoverTwoFactor,
|
||||
removeTwoFactor,
|
||||
type TwoFactorType,
|
||||
} from "@/accounts/api/user";
|
||||
import { PAGES } from "@/accounts/constants/pages";
|
||||
} from "@/accounts/services/user";
|
||||
import type { AccountsContextT } from "@/accounts/types/context";
|
||||
import {
|
||||
FormPaper,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { enableTwoFactor, setupTwoFactor } from "@/accounts/api/user";
|
||||
import VerifyTwoFactor, {
|
||||
type VerifyTwoFactorCallback,
|
||||
} from "@/accounts/components/two-factor/VerifyForm";
|
||||
import { TwoFactorSetup } from "@/accounts/components/two-factor/setup";
|
||||
import { enableTwoFactor, setupTwoFactor } from "@/accounts/services/user";
|
||||
import type { TwoFactorSecret } from "@/accounts/types/user";
|
||||
import log from "@/base/log";
|
||||
import { VerticallyCentered } from "@ente/shared/components/Container";
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { verifyTwoFactor } from "@/accounts/api/user";
|
||||
import VerifyTwoFactor, {
|
||||
type VerifyTwoFactorCallback,
|
||||
} from "@/accounts/components/two-factor/VerifyForm";
|
||||
import { PAGES } from "@/accounts/constants/pages";
|
||||
import { verifyTwoFactor } from "@/accounts/services/user";
|
||||
import {
|
||||
FormPaper,
|
||||
FormPaperFooter,
|
||||
|
||||
@@ -29,7 +29,6 @@ import { useEffect, useState } from "react";
|
||||
import { Trans } from "react-i18next";
|
||||
import type { SRPAttributes, SRPSetupAttributes } from "../api/srp";
|
||||
import { getSRPAttributes } from "../api/srp";
|
||||
import { putAttributes, sendOtt, verifyOtt } from "../api/user";
|
||||
import {
|
||||
LoginFlowFormFooter,
|
||||
VerifyingPasskey,
|
||||
@@ -41,6 +40,7 @@ import {
|
||||
} from "../services/passkey";
|
||||
import { stashedRedirect, unstashRedirect } from "../services/redirect";
|
||||
import { configureSRP } from "../services/srp";
|
||||
import { putAttributes, sendOtt, verifyOtt } from "../services/user";
|
||||
import type { PageProps } from "../types/page";
|
||||
|
||||
const Page: React.FC<PageProps> = ({ appContext }) => {
|
||||
|
||||
@@ -4,8 +4,8 @@ import { clearLocalStorage } from "@/base/local-storage";
|
||||
import log from "@/base/log";
|
||||
import localForage from "@ente/shared/storage/localForage";
|
||||
import { clearKeys } from "@ente/shared/storage/sessionStorage";
|
||||
import { logout as remoteLogout } from "../api/user";
|
||||
import { clearStashedRedirect } from "./redirect";
|
||||
import { logout as remoteLogout } from "./user";
|
||||
|
||||
/**
|
||||
* Logout sequence common to all apps that rely on the accounts package.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { setRecoveryKey } from "@/accounts/api/user";
|
||||
import { setRecoveryKey } from "@/accounts/services/user";
|
||||
import { sharedCryptoWorker } from "@/base/crypto";
|
||||
import log from "@/base/log";
|
||||
import {
|
||||
|
||||
Reference in New Issue
Block a user