π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Bespoke
Manav Rathi5d7ca1ac4473
diff --git a/web/packages/accounts/components/layouts/centered-paper.tsx b/web/packages/accounts/components/layouts/centered-paper.tsxindex cdbf9e6ff4..c0fcdd0e20 100644--- a/web/packages/accounts/components/layouts/centered-paper.tsx+++ b/web/packages/accounts/components/layouts/centered-paper.tsx@@ -38,7 +38,6 @@ const AccountsPagePaper = styled(Paper)(({ theme }) => ({display: "flex",flexDirection: "column",gap: theme.spacing(4),- overflowY: "scroll",}));export const AccountsPageTitle: React.FC<TypographyProps> = ({diff --git a/web/packages/accounts/components/two-factor/TwoFactorSetup.tsx b/web/packages/accounts/components/two-factor/TwoFactorSetup.tsxindex 8134c3b609..89005fff45 100644--- a/web/packages/accounts/components/two-factor/TwoFactorSetup.tsx+++ b/web/packages/accounts/components/two-factor/TwoFactorSetup.tsx@@ -20,7 +20,7 @@ export function TwoFactorSetup({ twoFactorSecret }: TwoFactorSetupProps) {const changeToQRMode = () => setSetupMode("qrCode");return (- <VerticallyCentered sx={{ mb: 3 }}>+ <VerticallyCentered sx={{ mb: 3, gap: 1 }}>{setupMode == "qrCode" ? (<SetupQRModetwoFactorSecret={twoFactorSecret}@@ -46,7 +46,9 @@ function SetupManualMode({}: SetupManualModeProps) {return (<>- <Typography>{t("two_factor_manual_entry_message")}</Typography>+ <Typography sx={{ color: "text.muted" }}>+ {t("two_factor_manual_entry_message")}+ </Typography><CodeBlock code={twoFactorSecret?.secretCode ?? ""} my={2} /><LinkButton onClick={changeToQRMode}>{t("scan_qr_title")}@@ -66,7 +68,9 @@ function SetupQRMode({}: SetupQRModeProps) {return (<>- <Typography>{t("two_factor_qr_help")}</Typography>+ <Typography sx={{ color: "text.muted" }}>+ {t("two_factor_qr_help")}+ </Typography>{!twoFactorSecret ? (<LoadingQRCode><ActivityIndicator />diff --git a/web/packages/accounts/pages/two-factor/setup.tsx b/web/packages/accounts/pages/two-factor/setup.tsxindex 9dc1a5c4e6..dc79beea43 100644--- a/web/packages/accounts/pages/two-factor/setup.tsx+++ b/web/packages/accounts/pages/two-factor/setup.tsx@@ -1,22 +1,21 @@+import {+ VerifyTwoFactor,+ type VerifyTwoFactorCallback,+} from "@/accounts/components/two-factor/VerifyTwoFactor";+import { appHomeRoute } from "@/accounts/services/redirect";+import type { TwoFactorSecret } from "@/accounts/services/user";+import { enableTwoFactor, setupTwoFactor } from "@/accounts/services/user";+import type { PageProps } from "@/accounts/types/page";+import { CenteredFill } from "@/base/components/containers";import log from "@/base/log";-import { VerticallyCentered } from "@ente/shared/components/Container";import LinkButton from "@ente/shared/components/LinkButton";import { encryptWithRecoveryKey } from "@ente/shared/crypto/helpers";-import { LS_KEYS, getData, setLSUser } from "@ente/shared/storage/localStorage";-import { Box, CardContent, Typography } from "@mui/material";-import Card from "@mui/material/Card";+import { getData, LS_KEYS, setLSUser } from "@ente/shared/storage/localStorage";+import { Paper, Stack, styled, Typography } from "@mui/material";import { t } from "i18next";import { useRouter } from "next/router";import { useEffect, useState } from "react";import { TwoFactorSetup } from "../../components/two-factor/TwoFactorSetup";-import {- VerifyTwoFactor,- type VerifyTwoFactorCallback,-} from "../../components/two-factor/VerifyTwoFactor";-import { appHomeRoute } from "../../services/redirect";-import type { TwoFactorSecret } from "../../services/user";-import { enableTwoFactor, setupTwoFactor } from "../../services/user";-import type { PageProps } from "../../types/page";export type SetupMode = "qrCode" | "manualCode";@@ -59,28 +58,35 @@ const Page: React.FC<PageProps> = () => {};return (- <VerticallyCentered>- <Card>- <CardContent>- <VerticallyCentered sx={{ p: 3 }}>- <Box sx={{ mb: 4 }}>- <Typography variant="h2">- {t("two_factor")}- </Typography>- </Box>+ <Stack sx={{ minHeight: "100vh" }}>+ <CenteredFill>+ <ContentsPaper>+ <Typography variant="h5" sx={{ textAlign: "center" }}>+ {t("two_factor")}+ </Typography>+ <Stack><TwoFactorSetup twoFactorSecret={twoFactorSecret} /><VerifyTwoFactoronSubmit={onSubmit}buttonText={t("enable")}/>- <LinkButton sx={{ mt: 2 }} onClick={router.back}>+ <LinkButton sx={{ mt: 1 }} onClick={router.back}>{t("go_back")}</LinkButton>- </VerticallyCentered>- </CardContent>- </Card>- </VerticallyCentered>+ </Stack>+ </ContentsPaper>+ </CenteredFill>+ </Stack>);};+const ContentsPaper = styled(Paper)(({ theme }) => ({+ marginBlock: theme.spacing(2),+ padding: theme.spacing(4, 2),+ width: "min(420px, 95vw)",+ display: "flex",+ flexDirection: "column",+ gap: theme.spacing(4),+}));+export default Page;