From 47ebf785f53c8a07f5ecba8dab353048a4edfc03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Souza?= Date: Mon, 9 Sep 2024 11:51:54 -0300 Subject: [PATCH 1/3] feat: always display next button in login page --- src/screens/Login/LoginForm.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/screens/Login/LoginForm.tsx b/src/screens/Login/LoginForm.tsx index 35b124b611..e3333f29b1 100644 --- a/src/screens/Login/LoginForm.tsx +++ b/src/screens/Login/LoginForm.tsx @@ -325,10 +325,11 @@ export const LoginForm = ({ Connecting... - ) : isReady ? ( + ) : ( - ) : undefined} + )} ) From b8e6983e7ba00cb2f8761f7a34ed6b5af079e36e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Souza?= Date: Thu, 12 Sep 2024 10:30:34 -0300 Subject: [PATCH 2/3] feat(LoginForm): enable next button and show message when data is not filled --- src/screens/Login/LoginForm.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/screens/Login/LoginForm.tsx b/src/screens/Login/LoginForm.tsx index e3333f29b1..1efac29360 100644 --- a/src/screens/Login/LoginForm.tsx +++ b/src/screens/Login/LoginForm.tsx @@ -83,12 +83,18 @@ export const LoginForm = ({ Keyboard.dismiss() LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut) setError('') - setIsProcessing(true) const identifier = identifierValueRef.current.toLowerCase().trim() const password = passwordValueRef.current const authFactorToken = authFactorTokenValueRef.current + if (!identifier || !password) { + setError(_(msg`Invalid username or password`)) + return + } + + setIsProcessing(true) + try { // try to guess the handle if the user just gave their own username let fullIdent = identifier @@ -329,7 +335,6 @@ export const LoginForm = ({