A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
mobile: fix login 2fa sheet (#1996)
Ammar Ahmed648eac555587
diff --git a/apps/mobile/app/components/auth/login.js b/apps/mobile/app/components/auth/login.jsindex 99a4a7049..eb0d3ceb5 100644--- a/apps/mobile/app/components/auth/login.js+++ b/apps/mobile/app/components/auth/login.js@@ -26,7 +26,6 @@ import { eSendEvent } from "../../services/event-manager";import { useThemeStore } from "../../stores/use-theme-store";import { SIZE } from "../../utils/size";import { sleep } from "../../utils/time";-import BaseDialog from "../dialog/base-dialog";import SheetProvider from "../sheet-provider";import { Progress } from "../sheets/progress";import { Button } from "../ui/button";@@ -83,9 +82,6 @@ export const Login = ({ changeMode }) => {<><ForgotPassword /><SheetProvider context="two_factor_verify" />- {loading ? (- <BaseDialog transparent={true} visible={true} animation="fade" />- ) : null}<Animated.Viewentering={FadeInDown}exiting={FadeOutUp}@@ -134,6 +130,7 @@ export const Login = ({ changeMode }) => {marginTop: 5}}onPress={() => {+ if (loading) return;changeMode(1);}}size={SIZE.md}@@ -172,7 +169,7 @@ export const Login = ({ changeMode }) => {errorMessage="Email is invalid"placeholder="Enter your email"defaultValue={email.current}- editable={step === LoginSteps.emailAuth}+ editable={step === LoginSteps.emailAuth && !loading}onSubmit={() => {passwordInputRef.current?.focus();}}@@ -194,6 +191,7 @@ export const Login = ({ changeMode }) => {autoCorrect={false}placeholder="Password"marginBottom={0}+ editable={!loading}defaultValue={password.current}onSubmit={() => login()}/>@@ -205,6 +203,7 @@ export const Login = ({ changeMode }) => {paddingHorizontal: 0}}onPress={() => {+ if (loading) return;SheetManager.show("forgotpassword_sheet", email.current);}}textStyle={{@@ -228,7 +227,10 @@ export const Login = ({ changeMode }) => {borderRadius: 100}}loading={loading}- onPress={login}+ onPress={() => {+ if (loading) return;+ login();+ }}type="accent"title={loading@@ -248,6 +250,7 @@ export const Login = ({ changeMode }) => {marginTop: 10}}onPress={() => {+ if (loading) return;setStep(LoginSteps.emailAuth);setLoading(false);}}diff --git a/apps/mobile/app/components/auth/signup.js b/apps/mobile/app/components/auth/signup.jsindex 161f8fcbf..2eaffd61c 100644--- a/apps/mobile/app/components/auth/signup.js+++ b/apps/mobile/app/components/auth/signup.js@@ -30,7 +30,6 @@ import { useUserStore } from "../../stores/use-user-store";import { openLinkInBrowser } from "../../utils/functions";import { SIZE } from "../../utils/size";import { sleep } from "../../utils/time";-import BaseDialog from "../dialog/base-dialog";import { Button } from "../ui/button";import Input from "../ui/input";import { SvgView } from "../ui/svg";@@ -97,9 +96,6 @@ export const Signup = ({ changeMode, trial }) => {return (<>- {loading ? (- <BaseDialog transparent={true} visible={true} animation="fade" />- ) : null}<Animated.Viewentering={FadeInDown}exiting={FadeOutUp}@@ -148,6 +144,7 @@ export const Signup = ({ changeMode, trial }) => {textAlign: "center"}}onPress={() => {+ if (loading) return;changeMode(0);}}size={SIZE.md}@@ -235,7 +232,10 @@ export const Signup = ({ changeMode, trial }) => {borderRadius: 100}}loading={loading}- onPress={signup}+ onPress={() => {+ if (loading) return;+ signup();+ }}type="accent"title={loading ? null : "Agree and continue"}/>