π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
tsc
Manav Rathi4b896d3aabd7
diff --git a/web/packages/accounts/components/ChangeEmail.tsx b/web/packages/accounts/components/ChangeEmail.tsxindex 6c76d644a6..bb29893bf9 100644--- a/web/packages/accounts/components/ChangeEmail.tsx+++ b/web/packages/accounts/components/ChangeEmail.tsx@@ -68,7 +68,8 @@ function ChangeEmailForm({ appName }: PageProps) {};const goToApp = () => {- router.push(APP_HOMES.get(appName));+ // TODO: Refactor the type of APP_HOMES to not require the ??+ router.push(APP_HOMES.get(appName) ?? "/");};return (diff --git a/web/packages/accounts/pages/change-password.tsx b/web/packages/accounts/pages/change-password.tsxindex 1696c5b9ff..24617cb46d 100644--- a/web/packages/accounts/pages/change-password.tsx+++ b/web/packages/accounts/pages/change-password.tsx@@ -121,7 +121,8 @@ export default function ChangePassword({ appName }: PageProps) {const redirectToAppHome = () => {setData(LS_KEYS.SHOW_BACK_BUTTON, { value: true });- router.push(APP_HOMES.get(appName));+ // TODO: Refactor the type of APP_HOMES to not require the ??+ router.push(APP_HOMES.get(appName) ?? "/");};return (diff --git a/web/packages/accounts/pages/credentials.tsx b/web/packages/accounts/pages/credentials.tsxindex 6ef39c7c7a..5da52ac023 100644--- a/web/packages/accounts/pages/credentials.tsx+++ b/web/packages/accounts/pages/credentials.tsx@@ -86,7 +86,8 @@ export default function Credentials({ appContext, appName }: PageProps) {}const token = getToken();if (key && token) {- router.push(APP_HOMES.get(appName));+ // TODO: Refactor the type of APP_HOMES to not require the ??+ router.push(APP_HOMES.get(appName) ?? "/");return;}const kekEncryptedAttributes: B64EncryptionResult = getKey(diff --git a/web/packages/accounts/pages/generate.tsx b/web/packages/accounts/pages/generate.tsxindex e9ad433d5b..21c803bc6f 100644--- a/web/packages/accounts/pages/generate.tsx+++ b/web/packages/accounts/pages/generate.tsx@@ -1,4 +1,5 @@import log from "@/next/log";+import { ensure } from "@/utils/ensure";import { putAttributes } from "@ente/accounts/api/user";import SetPasswordForm, {type SetPasswordFormProps,@@ -55,7 +56,8 @@ export default function Generate({ appContext, appName }: PageProps) {setRecoveryModalView(true);setLoading(false);} else {- router.push(APP_HOMES.get(appName));+ // TODO: Refactor the type of APP_HOMES to not require the ??+ router.push(APP_HOMES.get(appName) ?? "/");}} else if (keyAttributes?.encryptedKey) {router.push(PAGES.CREDENTIALS);@@ -76,7 +78,8 @@ export default function Generate({ appContext, appName }: PageProps) {const { keyAttributes, masterKey, srpSetupAttributes } =await generateKeyAndSRPAttributes(passphrase);- await putAttributes(token, keyAttributes);+ // TODO: Refactor the code to not require this ensure+ await putAttributes(ensure(token), keyAttributes);await configureSRP(srpSetupAttributes);await generateAndSaveIntermediateKeyAttributes(passphrase,@@ -94,7 +97,7 @@ export default function Generate({ appContext, appName }: PageProps) {return (<>- {loading ? (+ {loading || !user ? (<VerticallyCentered><EnteSpinner /></VerticallyCentered>@@ -104,7 +107,8 @@ export default function Generate({ appContext, appName }: PageProps) {show={recoverModalView}onHide={() => {setRecoveryModalView(false);- router.push(APP_HOMES.get(appName));+ // TODO: Refactor the type of APP_HOMES to not require the ??+ router.push(APP_HOMES.get(appName) ?? "/");}}/* TODO: Why is this error being ignored */somethingWentWrong={() => {}}@@ -114,7 +118,7 @@ export default function Generate({ appContext, appName }: PageProps) {<FormPaper><FormTitle>{t("SET_PASSPHRASE")}</FormTitle><SetPasswordForm- userEmail={user?.email}+ userEmail={user.email}callback={onSubmit}buttonText={t("SET_PASSPHRASE")}/>diff --git a/web/packages/accounts/pages/recover.tsx b/web/packages/accounts/pages/recover.tsxindex 2173037d37..09e0004875 100644--- a/web/packages/accounts/pages/recover.tsx+++ b/web/packages/accounts/pages/recover.tsx@@ -53,7 +53,8 @@ export default function Recover({ appContext, appName }: PageProps) {if (!keyAttributes) {router.push(PAGES.GENERATE);} else if (key) {- router.push(APP_HOMES.get(appName));+ // TODO: Refactor the type of APP_HOMES to not require the ??+ router.push(APP_HOMES.get(appName) ?? "/");} else {setKeyAttributes(keyAttributes);}