conv
This commit is contained in:
@@ -12,7 +12,6 @@ import { useBaseContext } from "@/base/context";
|
||||
import { isHTTP401Error } from "@/base/http";
|
||||
import log from "@/base/log";
|
||||
import { masterKeyFromSessionIfLoggedIn } from "@/base/session";
|
||||
import { AUTH_PAGES as PAGES } from "@ente/shared/constants/pages";
|
||||
import LogoutOutlinedIcon from "@mui/icons-material/LogoutOutlined";
|
||||
import {
|
||||
Box,
|
||||
@@ -42,7 +41,7 @@ const Page: React.FC = () => {
|
||||
const fetchCodes = async () => {
|
||||
const masterKey = await masterKeyFromSessionIfLoggedIn();
|
||||
if (!masterKey) {
|
||||
stashRedirect(PAGES.AUTH);
|
||||
stashRedirect("/auth");
|
||||
void router.push("/");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { PHOTOS_PAGES as PAGES } from "@ente/shared/constants/pages";
|
||||
import { useRouter } from "next/router";
|
||||
import React, { useEffect } from "react";
|
||||
|
||||
const Page: React.FC = () => {
|
||||
const router = useRouter();
|
||||
useEffect(() => void router.push(PAGES.LOGIN), [router]);
|
||||
useEffect(() => void router.push("/login"), [router]);
|
||||
return <></>;
|
||||
};
|
||||
|
||||
|
||||
@@ -68,7 +68,6 @@ import {
|
||||
} from "@/new/photos/services/user-details";
|
||||
import { usePhotosAppContext } from "@/new/photos/types/context";
|
||||
import { FlexWrapper } from "@ente/shared/components/Container";
|
||||
import { PHOTOS_PAGES as PAGES } from "@ente/shared/constants/pages";
|
||||
import { getRecoveryKey } from "@ente/shared/crypto/helpers";
|
||||
import { CustomError } from "@ente/shared/error";
|
||||
import { LS_KEYS, getData } from "@ente/shared/storage/localStorage";
|
||||
@@ -306,7 +305,7 @@ const Page: React.FC = () => {
|
||||
const key = getKey(SESSION_KEYS.ENCRYPTION_KEY);
|
||||
const token = getToken();
|
||||
if (!key || !token) {
|
||||
stashRedirect(PAGES.GALLERY);
|
||||
stashRedirect("/gallery");
|
||||
router.push("/");
|
||||
return;
|
||||
}
|
||||
@@ -603,7 +602,7 @@ const Page: React.FC = () => {
|
||||
break;
|
||||
case CustomError.KEY_MISSING:
|
||||
clearKeys();
|
||||
router.push(PAGES.CREDENTIALS);
|
||||
router.push("/credentials");
|
||||
break;
|
||||
default:
|
||||
log.error("syncWithRemote failed", e);
|
||||
|
||||
@@ -8,7 +8,6 @@ import { useBaseContext } from "@/base/context";
|
||||
import log from "@/base/log";
|
||||
import { albumsAppOrigin, customAPIHost } from "@/base/origins";
|
||||
import { DevSettings } from "@/new/photos/components/DevSettings";
|
||||
import { PHOTOS_PAGES as PAGES } from "@ente/shared/constants/pages";
|
||||
import { saveKeyInSessionStore } from "@ente/shared/crypto/helpers";
|
||||
import localForage from "@ente/shared/storage/localForage";
|
||||
import { LS_KEYS, getData } from "@ente/shared/storage/localStorage";
|
||||
@@ -41,7 +40,7 @@ const Page: React.FC = () => {
|
||||
currentURL.pathname = router.pathname;
|
||||
if (
|
||||
currentURL.host === albumsURL.host &&
|
||||
currentURL.pathname !== PAGES.SHARED_ALBUMS
|
||||
currentURL.pathname != "/shared-albums"
|
||||
) {
|
||||
handleAlbumsRedirect(currentURL);
|
||||
} else {
|
||||
@@ -53,7 +52,7 @@ const Page: React.FC = () => {
|
||||
const end = currentURL.hash.lastIndexOf("&");
|
||||
const hash = currentURL.hash.slice(1, end !== -1 ? end : undefined);
|
||||
await router.replace({
|
||||
pathname: PAGES.SHARED_ALBUMS,
|
||||
pathname: "/shared-albums",
|
||||
search: currentURL.search,
|
||||
hash: hash,
|
||||
});
|
||||
@@ -80,9 +79,9 @@ const Page: React.FC = () => {
|
||||
}
|
||||
const token = getToken();
|
||||
if (key && token) {
|
||||
await router.push(PAGES.GALLERY);
|
||||
await router.push("/gallery");
|
||||
} else if (user?.email) {
|
||||
await router.push(PAGES.VERIFY);
|
||||
await router.push("/verify");
|
||||
}
|
||||
await initLocalForage();
|
||||
setLoading(false);
|
||||
@@ -107,8 +106,8 @@ const Page: React.FC = () => {
|
||||
const signUp = () => setShowLogin(false);
|
||||
const login = () => setShowLogin(true);
|
||||
|
||||
const redirectToSignupPage = () => router.push(PAGES.SIGNUP);
|
||||
const redirectToLoginPage = () => router.push(PAGES.LOGIN);
|
||||
const redirectToSignupPage = () => router.push("/signup");
|
||||
const redirectToLoginPage = () => router.push("/login");
|
||||
|
||||
return (
|
||||
<TappableContainer onMaybeChangeHost={refreshHost}>
|
||||
|
||||
@@ -43,7 +43,6 @@ import { CenteredFlex } from "@ente/shared/components/Container";
|
||||
import SingleInputForm, {
|
||||
type SingleInputFormProps,
|
||||
} from "@ente/shared/components/SingleInputForm";
|
||||
import { PHOTOS_PAGES as PAGES } from "@ente/shared/constants/pages";
|
||||
import { CustomError, parseSharingErrorCodes } from "@ente/shared/error";
|
||||
import AddPhotoAlternateOutlinedIcon from "@mui/icons-material/AddPhotoAlternateOutlined";
|
||||
import CloseIcon from "@mui/icons-material/Close";
|
||||
@@ -185,7 +184,7 @@ export default function PublicCollectionGallery() {
|
||||
if (currentURL.pathname !== "/") {
|
||||
router.replace(
|
||||
{
|
||||
pathname: PAGES.SHARED_ALBUMS,
|
||||
pathname: "/shared-albums",
|
||||
search: currentURL.search,
|
||||
hash: currentURL.hash,
|
||||
},
|
||||
|
||||
@@ -2,7 +2,6 @@ import {
|
||||
AccountsPageFooter,
|
||||
AccountsPageTitle,
|
||||
} from "@/accounts/components/layouts/centered-paper";
|
||||
import { PAGES } from "@/accounts/constants/pages";
|
||||
import { getSRPAttributes } from "@/accounts/services/srp-remote";
|
||||
import { sendOTT } from "@/accounts/services/user";
|
||||
import { LinkButton } from "@/base/components/LinkButton";
|
||||
@@ -54,11 +53,11 @@ export const LoginContents: React.FC<LoginContentsProps> = ({
|
||||
throw e;
|
||||
}
|
||||
await setLSUser({ email });
|
||||
void router.push(PAGES.VERIFY);
|
||||
void router.push("/verify");
|
||||
} else {
|
||||
await setLSUser({ email });
|
||||
setData(LS_KEYS.SRP_ATTRIBUTES, srpAttributes);
|
||||
void router.push(PAGES.CREDENTIALS);
|
||||
void router.push("/credentials");
|
||||
}
|
||||
} catch (e) {
|
||||
log.error("Login failed", e);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PAGES } from "@/accounts/constants/pages";
|
||||
import { generateKeyAndSRPAttributes } from "@/accounts/services/srp";
|
||||
import { sendOTT } from "@/accounts/services/user";
|
||||
import { isWeakPassword } from "@/accounts/utils/password";
|
||||
@@ -122,7 +121,7 @@ export const SignUpContents: React.FC<SignUpContentsProps> = ({
|
||||
masterKey,
|
||||
);
|
||||
setJustSignedUp(true);
|
||||
void router.push(PAGES.VERIFY);
|
||||
void router.push("/verify");
|
||||
} catch (e) {
|
||||
setFieldError("confirm", t("password_generation_failed"));
|
||||
throw e;
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
export enum PAGES {
|
||||
ROOT = "/",
|
||||
CHANGE_PASSWORD = "/change-password",
|
||||
CREDENTIALS = "/credentials",
|
||||
GENERATE = "/generate",
|
||||
LOGIN = "/login",
|
||||
RECOVER = "/recover",
|
||||
SIGNUP = "/signup",
|
||||
TWO_FACTOR_SETUP = "/two-factor/setup",
|
||||
TWO_FACTOR_VERIFY = "/two-factor/verify",
|
||||
TWO_FACTOR_RECOVER = "/two-factor/recover",
|
||||
// PASSKEY_RECOVER = "/passkeys/recover",
|
||||
VERIFY = "/verify",
|
||||
SHARED_ALBUMS = "/shared-albums",
|
||||
}
|
||||
@@ -6,7 +6,6 @@ import {
|
||||
import SetPasswordForm, {
|
||||
type SetPasswordFormProps,
|
||||
} from "@/accounts/components/SetPasswordForm";
|
||||
import { PAGES } from "@/accounts/constants/pages";
|
||||
import { appHomeRoute, stashRedirect } from "@/accounts/services/redirect";
|
||||
import {
|
||||
convertBase64ToBuffer,
|
||||
@@ -45,7 +44,7 @@ const Page: React.FC = () => {
|
||||
const user = getData(LS_KEYS.USER);
|
||||
setUser(user);
|
||||
if (!user?.token) {
|
||||
stashRedirect(PAGES.CHANGE_PASSWORD);
|
||||
stashRedirect("/change-password");
|
||||
void router.push("/");
|
||||
} else {
|
||||
setToken(user.token);
|
||||
|
||||
@@ -7,7 +7,6 @@ import {
|
||||
import { SecondFactorChoice } from "@/accounts/components/SecondFactorChoice";
|
||||
import { sessionExpiredDialogAttributes } from "@/accounts/components/utils/dialog";
|
||||
import { useSecondFactorChoiceIfNeeded } from "@/accounts/components/utils/second-factor-choice";
|
||||
import { PAGES } from "@/accounts/constants/pages";
|
||||
import {
|
||||
openPasskeyVerificationURL,
|
||||
passkeyVerificationRedirectURL,
|
||||
@@ -264,7 +263,7 @@ const Page: React.FC = () => {
|
||||
twoFactorSessionID,
|
||||
isTwoFactorEnabled: true,
|
||||
});
|
||||
void router.push(PAGES.TWO_FACTOR_VERIFY);
|
||||
void router.push("/two-factor/verify");
|
||||
throw Error(CustomError.TWO_FACTOR_ENABLED);
|
||||
} else {
|
||||
const user = getData(LS_KEYS.USER);
|
||||
@@ -379,7 +378,7 @@ const Page: React.FC = () => {
|
||||
/>
|
||||
|
||||
<AccountsPageFooterWithHost>
|
||||
<LinkButton onClick={() => router.push(PAGES.RECOVER)}>
|
||||
<LinkButton onClick={() => router.push("/recover")}>
|
||||
{t("forgot_password")}
|
||||
</LinkButton>
|
||||
<LinkButton onClick={logout}>{t("change_email")}</LinkButton>
|
||||
|
||||
@@ -7,7 +7,6 @@ import { RecoveryKey } from "@/accounts/components/RecoveryKey";
|
||||
import SetPasswordForm, {
|
||||
type SetPasswordFormProps,
|
||||
} from "@/accounts/components/SetPasswordForm";
|
||||
import { PAGES } from "@/accounts/constants/pages";
|
||||
import { appHomeRoute } from "@/accounts/services/redirect";
|
||||
import {
|
||||
configureSRP,
|
||||
@@ -60,7 +59,7 @@ const Page: React.FC = () => {
|
||||
void router.push(appHomeRoute);
|
||||
}
|
||||
} else if (keyAttributes?.encryptedKey) {
|
||||
void router.push(PAGES.CREDENTIALS);
|
||||
void router.push("/credentials");
|
||||
} else {
|
||||
setToken(user.token);
|
||||
setLoading(false);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { AccountsPageContents } from "@/accounts/components/layouts/centered-paper";
|
||||
import { LoginContents } from "@/accounts/components/LoginContents";
|
||||
import { PAGES } from "@/accounts/constants/pages";
|
||||
import { LoadingIndicator } from "@/base/components/loaders";
|
||||
import { customAPIHost } from "@/base/origins";
|
||||
import { LS_KEYS, getData } from "@ente/shared/storage/localStorage";
|
||||
@@ -17,12 +16,12 @@ const Page: React.FC = () => {
|
||||
void customAPIHost().then(setHost);
|
||||
const user = getData(LS_KEYS.USER);
|
||||
if (user?.email) {
|
||||
void router.push(PAGES.VERIFY);
|
||||
void router.push("/verify");
|
||||
}
|
||||
setLoading(false);
|
||||
}, [router]);
|
||||
|
||||
const onSignUp = () => void router.push(PAGES.SIGNUP);
|
||||
const onSignUp = () => void router.push("/signup");
|
||||
|
||||
return loading ? (
|
||||
<LoadingIndicator />
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { PAGES } from "@/accounts/constants/pages";
|
||||
import { unstashRedirect } from "@/accounts/services/redirect";
|
||||
import { LoadingIndicator } from "@/base/components/loaders";
|
||||
import { fromB64URLSafeNoPaddingString } from "@/base/crypto/libsodium";
|
||||
@@ -99,5 +98,5 @@ const saveCredentialsAndNavigateTo = async (
|
||||
await setLSUser({ ...getData(LS_KEYS.USER), token, encryptedToken, id });
|
||||
setData(LS_KEYS.KEY_ATTRIBUTES, keyAttributes);
|
||||
|
||||
return unstashRedirect() ?? PAGES.CREDENTIALS;
|
||||
return unstashRedirect() ?? "/credentials";
|
||||
};
|
||||
|
||||
@@ -3,7 +3,6 @@ import {
|
||||
AccountsPageFooter,
|
||||
AccountsPageTitle,
|
||||
} from "@/accounts/components/layouts/centered-paper";
|
||||
import { PAGES } from "@/accounts/constants/pages";
|
||||
import { appHomeRoute, stashRedirect } from "@/accounts/services/redirect";
|
||||
import { sendOTT } from "@/accounts/services/user";
|
||||
import { LinkButton } from "@/base/components/LinkButton";
|
||||
@@ -48,12 +47,12 @@ const Page: React.FC = () => {
|
||||
}
|
||||
if (!user?.encryptedToken && !user?.token) {
|
||||
void sendOTT(user.email, undefined);
|
||||
stashRedirect(PAGES.RECOVER);
|
||||
void router.push(PAGES.VERIFY);
|
||||
stashRedirect("/recover");
|
||||
void router.push("/verify");
|
||||
return;
|
||||
}
|
||||
if (!keyAttributes) {
|
||||
void router.push(PAGES.GENERATE);
|
||||
void router.push("/generate");
|
||||
} else if (key) {
|
||||
void router.push(appHomeRoute);
|
||||
} else {
|
||||
@@ -90,7 +89,7 @@ const Page: React.FC = () => {
|
||||
await decryptAndStoreToken(keyAttr, masterKey);
|
||||
|
||||
setData(LS_KEYS.SHOW_BACK_BUTTON, { value: false });
|
||||
void router.push(PAGES.CHANGE_PASSWORD);
|
||||
void router.push("/change-password");
|
||||
} catch (e) {
|
||||
log.error("password recovery failed", e);
|
||||
setFieldError(t("incorrect_recovery_key"));
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { AccountsPageContents } from "@/accounts/components/layouts/centered-paper";
|
||||
import { SignUpContents } from "@/accounts/components/SignUpContents";
|
||||
import { PAGES } from "@/accounts/constants/pages";
|
||||
import { LoadingIndicator } from "@/base/components/loaders";
|
||||
import { customAPIHost } from "@/base/origins";
|
||||
import { LS_KEYS, getData } from "@ente/shared//storage/localStorage";
|
||||
@@ -17,12 +16,12 @@ const Page: React.FC = () => {
|
||||
void customAPIHost().then(setHost);
|
||||
const user = getData(LS_KEYS.USER);
|
||||
if (user?.email) {
|
||||
void router.push(PAGES.VERIFY);
|
||||
void router.push("/verify");
|
||||
}
|
||||
setLoading(false);
|
||||
}, [router]);
|
||||
|
||||
const onLogin = () => void router.push(PAGES.LOGIN);
|
||||
const onLogin = () => void router.push("/login");
|
||||
|
||||
return loading ? (
|
||||
<LoadingIndicator />
|
||||
|
||||
@@ -3,7 +3,6 @@ import {
|
||||
AccountsPageFooter,
|
||||
AccountsPageTitle,
|
||||
} from "@/accounts/components/layouts/centered-paper";
|
||||
import { PAGES } from "@/accounts/constants/pages";
|
||||
import {
|
||||
recoverTwoFactor,
|
||||
removeTwoFactor,
|
||||
@@ -61,7 +60,7 @@ const Page: React.FC<RecoverPageProps> = ({ twoFactorType }) => {
|
||||
!(user.isTwoFactorEnabled || user.isTwoFactorEnabledPasskey) &&
|
||||
(user.encryptedToken || user.token)
|
||||
) {
|
||||
void router.push(PAGES.GENERATE);
|
||||
void router.push("/generate");
|
||||
} else {
|
||||
setSessionID(sid);
|
||||
}
|
||||
@@ -135,7 +134,7 @@ const Page: React.FC<RecoverPageProps> = ({ twoFactorType }) => {
|
||||
isTwoFactorEnabled: false,
|
||||
});
|
||||
setData(LS_KEYS.KEY_ATTRIBUTES, keyAttributes);
|
||||
void router.push(PAGES.CREDENTIALS);
|
||||
void router.push("/credentials");
|
||||
} catch (e) {
|
||||
log.error("two factor recovery failed", e);
|
||||
setFieldError(t("incorrect_recovery_key"));
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Verify2FACodeForm } from "@/accounts/components/Verify2FACodeForm";
|
||||
import { PAGES } from "@/accounts/constants/pages";
|
||||
import { verifyTwoFactor } from "@/accounts/services/user";
|
||||
import { LinkButton } from "@/base/components/LinkButton";
|
||||
import { useBaseContext } from "@/base/context";
|
||||
@@ -36,7 +35,7 @@ const Page: React.FC = () => {
|
||||
!user.isTwoFactorEnabled &&
|
||||
(user.encryptedToken || user.token)
|
||||
) {
|
||||
void router.push(PAGES.CREDENTIALS);
|
||||
void router.push("/credentials");
|
||||
} else {
|
||||
setSessionID(user.twoFactorSessionID);
|
||||
}
|
||||
@@ -53,7 +52,7 @@ const Page: React.FC = () => {
|
||||
id,
|
||||
});
|
||||
setData(LS_KEYS.KEY_ATTRIBUTES, keyAttributes!);
|
||||
await router.push(unstashRedirect() ?? PAGES.CREDENTIALS);
|
||||
await router.push(unstashRedirect() ?? "/credentials");
|
||||
} catch (e) {
|
||||
if (e instanceof HTTPError && e.res.status == 404) {
|
||||
logout();
|
||||
@@ -71,9 +70,7 @@ const Page: React.FC = () => {
|
||||
submitButtonText={t("verify")}
|
||||
/>
|
||||
<AccountsPageFooter>
|
||||
<LinkButton
|
||||
onClick={() => router.push(PAGES.TWO_FACTOR_RECOVER)}
|
||||
>
|
||||
<LinkButton onClick={() => router.push("/two-factor/recover")}>
|
||||
{t("lost_2fa_device")}
|
||||
</LinkButton>
|
||||
<LinkButton onClick={logout}>{t("change_email")}</LinkButton>
|
||||
|
||||
@@ -6,7 +6,6 @@ import {
|
||||
import { VerifyingPasskey } from "@/accounts/components/LoginComponents";
|
||||
import { SecondFactorChoice } from "@/accounts/components/SecondFactorChoice";
|
||||
import { useSecondFactorChoiceIfNeeded } from "@/accounts/components/utils/second-factor-choice";
|
||||
import { PAGES } from "@/accounts/constants/pages";
|
||||
import {
|
||||
openPasskeyVerificationURL,
|
||||
passkeyVerificationRedirectURL,
|
||||
@@ -123,7 +122,7 @@ const Page: React.FC = () => {
|
||||
isTwoFactorEnabled: true,
|
||||
});
|
||||
setIsFirstLogin(true);
|
||||
void router.push(PAGES.TWO_FACTOR_VERIFY);
|
||||
void router.push("/two-factor/verify");
|
||||
} else {
|
||||
await setLSUser({
|
||||
email,
|
||||
@@ -154,9 +153,9 @@ const Page: React.FC = () => {
|
||||
const redirectURL = unstashRedirect();
|
||||
if (keyAttributes?.encryptedKey) {
|
||||
clearKeys();
|
||||
void router.push(redirectURL ?? PAGES.CREDENTIALS);
|
||||
void router.push(redirectURL ?? "/credentials");
|
||||
} else {
|
||||
void router.push(redirectURL ?? PAGES.GENERATE);
|
||||
void router.push(redirectURL ?? "/generate");
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
@@ -275,11 +274,11 @@ const redirectionIfNeeded = async (user: User | undefined) => {
|
||||
const keyAttributes: KeyAttributes = getData(LS_KEYS.KEY_ATTRIBUTES);
|
||||
|
||||
if (keyAttributes?.encryptedKey && (user.token || user.encryptedToken)) {
|
||||
return PAGES.CREDENTIALS;
|
||||
return "/credentials";
|
||||
}
|
||||
|
||||
// If we're coming here during the recover flow, do not redirect.
|
||||
if (stashedRedirect() == PAGES.RECOVER) return undefined;
|
||||
if (stashedRedirect() == "/recover") return undefined;
|
||||
|
||||
// The user might have email verification disabled, but after previously
|
||||
// entering their email on the login screen, they might've closed the tab
|
||||
@@ -299,7 +298,7 @@ const redirectionIfNeeded = async (user: User | undefined) => {
|
||||
// API calls are fine.
|
||||
const latestSRPAttributes = await getSRPAttributes(email);
|
||||
if (latestSRPAttributes && !latestSRPAttributes.isEmailMFAEnabled) {
|
||||
return PAGES.CREDENTIALS;
|
||||
return "/credentials";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { appName } from "@/base/app";
|
||||
import { AUTH_PAGES, PHOTOS_PAGES } from "@ente/shared/constants/pages";
|
||||
|
||||
/**
|
||||
* The default page ("home route") for each of our apps.
|
||||
@@ -8,9 +7,9 @@ import { AUTH_PAGES, PHOTOS_PAGES } from "@ente/shared/constants/pages";
|
||||
*/
|
||||
export const appHomeRoute: string = {
|
||||
accounts: "/passkeys",
|
||||
auth: AUTH_PAGES.AUTH,
|
||||
auth: "/auth",
|
||||
cast: "/" /* The cast app doesn't use this, this is an arbitrary value. */,
|
||||
photos: PHOTOS_PAGES.GALLERY,
|
||||
photos: "/gallery",
|
||||
}[appName];
|
||||
|
||||
let _stashedRedirect: string | undefined;
|
||||
|
||||
@@ -12,7 +12,6 @@ import {
|
||||
} from "@/base/components/mui/SidebarDrawer";
|
||||
import { useBaseContext } from "@/base/context";
|
||||
import { disable2FA, get2FAStatus } from "@/new/photos/services/user";
|
||||
import { PHOTOS_PAGES as PAGES } from "@ente/shared/constants/pages";
|
||||
import { LS_KEYS, getData, setLSUser } from "@ente/shared/storage/localStorage";
|
||||
import LockIcon from "@mui/icons-material/Lock";
|
||||
import { Stack, Typography } from "@mui/material";
|
||||
@@ -83,7 +82,7 @@ const SetupDrawerContents: React.FC<ContentsProps> = ({ onRootClose }) => {
|
||||
|
||||
const configure = () => {
|
||||
onRootClose();
|
||||
void router.push(PAGES.TWO_FACTOR_SETUP);
|
||||
void router.push("/two-factor/setup");
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -142,7 +141,7 @@ const ManageDrawerContents: React.FC<ContentsProps> = ({ onRootClose }) => {
|
||||
|
||||
const reconfigure = async () => {
|
||||
onRootClose();
|
||||
await router.push(PAGES.TWO_FACTOR_SETUP);
|
||||
await router.push("/two-factor/setup");
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
export enum PHOTOS_PAGES {
|
||||
CHANGE_PASSWORD = "/change-password",
|
||||
CREDENTIALS = "/credentials",
|
||||
GALLERY = "/gallery",
|
||||
GENERATE = "/generate",
|
||||
LOGIN = "/login",
|
||||
RECOVER = "/recover",
|
||||
SIGNUP = "/signup",
|
||||
TWO_FACTOR_SETUP = "/two-factor/setup",
|
||||
TWO_FACTOR_VERIFY = "/two-factor/verify",
|
||||
TWO_FACTOR_RECOVER = "/two-factor/recover",
|
||||
VERIFY = "/verify",
|
||||
ROOT = "/",
|
||||
SHARED_ALBUMS = "/shared-albums",
|
||||
}
|
||||
|
||||
export enum AUTH_PAGES {
|
||||
CHANGE_PASSWORD = "/change-password",
|
||||
CREDENTIALS = "/credentials",
|
||||
GALLERY = "/gallery",
|
||||
GENERATE = "/generate",
|
||||
LOGIN = "/login",
|
||||
RECOVER = "/recover",
|
||||
SIGNUP = "/signup",
|
||||
TWO_FACTOR_SETUP = "/two-factor/setup",
|
||||
TWO_FACTOR_VERIFY = "/two-factor/verify",
|
||||
TWO_FACTOR_RECOVER = "/two-factor/recover",
|
||||
VERIFY = "/verify",
|
||||
ROOT = "/",
|
||||
AUTH = "/auth",
|
||||
}
|
||||
Reference in New Issue
Block a user