π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Scope
Manav Rathi1c1fe7f1df30
diff --git a/web/packages/accounts/components/Verify2FACodeForm.tsx b/web/packages/accounts/components/Verify2FACodeForm.tsxindex d83dba61cb..b52ab6a3cb 100644--- a/web/packages/accounts/components/Verify2FACodeForm.tsx+++ b/web/packages/accounts/components/Verify2FACodeForm.tsx@@ -71,7 +71,7 @@ export const Verify2FACodeForm: React.FC<Verify2FACodeFormProps> = ({useEffect(() => {if (values.otp.length == 6 && !isSubmitting) void submitForm();- }, [values, isSubmitting]);+ }, [values, isSubmitting, submitForm]);return (<form onSubmit={handleSubmit}>diff --git a/web/packages/accounts/eslint.config.mjs b/web/packages/accounts/eslint.config.mjsindex d721f5eb56..c2a6fbb566 100644--- a/web/packages/accounts/eslint.config.mjs+++ b/web/packages/accounts/eslint.config.mjs@@ -4,10 +4,7 @@ export default [...config,{rules: {- /* TODO:- * "This rule requires the `strictNullChecks` compiler option to be- * turned on to function correctly"- */+ /* TODO: */"@typescript-eslint/no-unnecessary-condition": "off","@typescript-eslint/no-unsafe-assignment": "off","@typescript-eslint/no-explicit-any": "off",@@ -15,8 +12,6 @@ export default ["@typescript-eslint/no-unsafe-member-access": "off","@typescript-eslint/no-unsafe-argument": "off","@typescript-eslint/no-unsafe-call": "off",- /** TODO: Disabled as we migrate, try to prune these again */- "react-hooks/exhaustive-deps": "off",},},];diff --git a/web/packages/accounts/pages/change-email.tsx b/web/packages/accounts/pages/change-email.tsxindex cbf6618f9e..cc965f02b7 100644--- a/web/packages/accounts/pages/change-email.tsx+++ b/web/packages/accounts/pages/change-email.tsx@@ -27,7 +27,7 @@ const Page: React.FC = () => {if (!user?.token) {void router.push("/");}- }, []);+ }, [router]);return (<AccountsPageContents>diff --git a/web/packages/accounts/pages/change-password.tsx b/web/packages/accounts/pages/change-password.tsxindex d8cc197faa..e19d6aff7a 100644--- a/web/packages/accounts/pages/change-password.tsx+++ b/web/packages/accounts/pages/change-password.tsx@@ -50,7 +50,7 @@ const Page: React.FC = () => {} else {setToken(user.token);}- }, []);+ }, [router]);const onSubmit: SetPasswordFormProps["callback"] = async (passphrase,diff --git a/web/packages/accounts/pages/credentials.tsx b/web/packages/accounts/pages/credentials.tsxindex 76c2b50829..db8cd75a7a 100644--- a/web/packages/accounts/pages/credentials.tsx+++ b/web/packages/accounts/pages/credentials.tsx@@ -199,9 +199,10 @@ const Page: React.FC = () => {}};void main();+ // TODO: validateSession is a dependency, but add that only after we've+ // wrapped items from the callback (like logout) in useCallback too.+ // eslint-disable-next-line react-hooks/exhaustive-deps}, []);- // TODO: ^ validateSession is a dependency, but add that only after we've- // wrapped items from the callback (like logout) in useCallback too.const getKeyAttributes: VerifyMasterPasswordFormProps["getKeyAttributes"] =async (kek: string) => {diff --git a/web/packages/accounts/pages/generate.tsx b/web/packages/accounts/pages/generate.tsxindex 5794a98171..8010e7e378 100644--- a/web/packages/accounts/pages/generate.tsx+++ b/web/packages/accounts/pages/generate.tsx@@ -65,7 +65,7 @@ const Page: React.FC = () => {setToken(user.token);setLoading(false);}- }, []);+ }, [router]);const onSubmit: SetPasswordFormProps["callback"] = async (passphrase,diff --git a/web/packages/accounts/pages/login.tsx b/web/packages/accounts/pages/login.tsxindex 5e26b9cd2a..a4927b61c9 100644--- a/web/packages/accounts/pages/login.tsx+++ b/web/packages/accounts/pages/login.tsx@@ -20,7 +20,7 @@ const Page: React.FC = () => {void router.push(PAGES.VERIFY);}setLoading(false);- }, []);+ }, [router]);const onSignUp = () => void router.push(PAGES.SIGNUP);diff --git a/web/packages/accounts/pages/passkeys/finish.tsx b/web/packages/accounts/pages/passkeys/finish.tsxindex 1ef91aaad8..258d062b94 100644--- a/web/packages/accounts/pages/passkeys/finish.tsx+++ b/web/packages/accounts/pages/passkeys/finish.tsx@@ -33,7 +33,7 @@ const Page: React.FC = () => {void saveCredentialsAndNavigateTo(passkeySessionID, response).then((slug: string) => router.push(slug),);- }, []);+ }, [router]);return <LoadingIndicator />;};diff --git a/web/packages/accounts/pages/recover.tsx b/web/packages/accounts/pages/recover.tsxindex 29c92dcb02..7c69ea44a6 100644--- a/web/packages/accounts/pages/recover.tsx+++ b/web/packages/accounts/pages/recover.tsx@@ -59,7 +59,7 @@ const Page: React.FC = () => {} else {setKeyAttributes(keyAttributes);}- }, []);+ }, [router]);const recover: SingleInputFormProps["callback"] = async (recoveryKey: string,diff --git a/web/packages/accounts/pages/signup.tsx b/web/packages/accounts/pages/signup.tsxindex 89033339b5..4920053c24 100644--- a/web/packages/accounts/pages/signup.tsx+++ b/web/packages/accounts/pages/signup.tsx@@ -20,7 +20,7 @@ const Page: React.FC = () => {void router.push(PAGES.VERIFY);}setLoading(false);- }, []);+ }, [router]);const onLogin = () => void router.push(PAGES.LOGIN);diff --git a/web/packages/accounts/pages/two-factor/recover.tsx b/web/packages/accounts/pages/two-factor/recover.tsxindex 6c6925a84d..274042ecdd 100644--- a/web/packages/accounts/pages/two-factor/recover.tsx+++ b/web/packages/accounts/pages/two-factor/recover.tsx@@ -92,6 +92,8 @@ const Page: React.FC<RecoverPageProps> = ({ twoFactorType }) => {}};void main();+ // TODO:+ // eslint-disable-next-line react-hooks/exhaustive-deps}, []);const recover: SingleInputFormProps["callback"] = async (diff --git a/web/packages/accounts/pages/two-factor/verify.tsx b/web/packages/accounts/pages/two-factor/verify.tsxindex e1e13af0c0..8434969600 100644--- a/web/packages/accounts/pages/two-factor/verify.tsx+++ b/web/packages/accounts/pages/two-factor/verify.tsx@@ -40,7 +40,7 @@ const Page: React.FC = () => {} else {setSessionID(user.twoFactorSessionID);}- }, []);+ }, [router]);const handleSubmit = async (otp: string) => {try {diff --git a/web/packages/accounts/pages/verify.tsx b/web/packages/accounts/pages/verify.tsxindex 3c1f0047ba..12eef1ac20 100644--- a/web/packages/accounts/pages/verify.tsx+++ b/web/packages/accounts/pages/verify.tsx@@ -74,7 +74,7 @@ const Page: React.FC = () => {}};void main();- }, []);+ }, [router]);const onSubmit: SingleInputFormProps["callback"] = async (ott,