Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

gen

Manav Rathi563834a8fda4
diff --git a/web/packages/accounts/components/SetPasswordForm.tsx b/web/packages/accounts/components/SetPasswordForm.tsx
index 66eb040d44..3840144da9 100644
--- a/web/packages/accounts/components/SetPasswordForm.tsx
+++ b/web/packages/accounts/components/SetPasswordForm.tsx
@@ -143,7 +143,7 @@ function SetPasswordForm(props: SetPasswordFormProps) {
<Trans i18nKey={"pick_password_caution"} />
</Typography>
- <Box sx={{ my: 4 }}>
+ <Box sx={{ mt: 4, mb: 2 }}>
<LoadingButton
fullWidth
color="accent"
diff --git a/web/packages/accounts/pages/generate.tsx b/web/packages/accounts/pages/generate.tsx
index 6f381d0617..86348280b8 100644
--- a/web/packages/accounts/pages/generate.tsx
+++ b/web/packages/accounts/pages/generate.tsx
@@ -1,21 +1,22 @@
+import {
+ AccountsPageContents,
+ AccountsPageFooter,
+ AccountsPageTitle,
+} from "@/accounts/components/layouts/centered-paper";
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,
generateKeyAndSRPAttributes,
} from "@/accounts/services/srp";
import { putAttributes } from "@/accounts/services/user";
-import {
- FormPaper,
- FormPaperFooter,
- FormPaperTitle,
-} from "@/base/components/FormPaper";
+import type { PageProps } from "@/accounts/types/page";
import { LoadingIndicator } from "@/base/components/loaders";
import log from "@/base/log";
-import { VerticallyCentered } from "@ente/shared/components/Container";
import LinkButton from "@ente/shared/components/LinkButton";
import {
generateAndSaveIntermediateKeyAttributes,
@@ -31,8 +32,6 @@ import type { KeyAttributes, User } from "@ente/shared/user/types";
import { t } from "i18next";
import { useRouter } from "next/router";
import { useEffect, useState } from "react";
-import { appHomeRoute } from "../services/redirect";
-import type { PageProps } from "../types/page";
const Page: React.FC<PageProps> = ({ appContext }) => {
const { logout, showMiniDialog } = appContext;
@@ -66,7 +65,6 @@ const Page: React.FC<PageProps> = ({ appContext }) => {
setToken(user.token);
setLoading(false);
}
- appContext.showNavBar(true);
}, []);
const onSubmit: SetPasswordFormProps["callback"] = async (
@@ -108,21 +106,17 @@ const Page: React.FC<PageProps> = ({ appContext }) => {
showMiniDialog={showMiniDialog}
/>
) : (
- <VerticallyCentered>
- <FormPaper>
- <FormPaperTitle>{t("set_password")}</FormPaperTitle>
- <SetPasswordForm
- userEmail={user.email}
- callback={onSubmit}
- buttonText={t("set_password")}
- />
- <FormPaperFooter>
- <LinkButton onClick={logout}>
- {t("go_back")}
- </LinkButton>
- </FormPaperFooter>
- </FormPaper>
- </VerticallyCentered>
+ <AccountsPageContents>
+ <AccountsPageTitle>{t("set_password")}</AccountsPageTitle>
+ <SetPasswordForm
+ userEmail={user.email}
+ callback={onSubmit}
+ buttonText={t("set_password")}
+ />
+ <AccountsPageFooter>
+ <LinkButton onClick={logout}>{t("go_back")}</LinkButton>
+ </AccountsPageFooter>
+ </AccountsPageContents>
)}
</>
);