From 5c18b805749450aabc50999b9f343a77a358e030 Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Fri, 2 Sep 2022 15:17:03 -0700 Subject: [PATCH 1/7] maintain: fix punctuation in login message --- ui/pages/login/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/pages/login/index.js b/ui/pages/login/index.js index 89e8f8b8d3..71e266e334 100644 --- a/ui/pages/login/index.js +++ b/ui/pages/login/index.js @@ -125,8 +125,8 @@ export default function Login() { <>

Login to Infra

- Welcome back. Login with your credentials{' '} - {providers?.length > 0 && 'or via your identity provider.'} + Welcome back. Login with your credentials + {providers?.length > 0 && ' or via your identity provider'}.

{providers?.length > 0 && ( <> From 2f8660fcabb811230afd45b56f9d124e52ceaf7d Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Fri, 2 Sep 2022 15:24:21 -0700 Subject: [PATCH 2/7] fix: disable submit button immediately after click --- ui/pages/password-reset/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/pages/password-reset/index.js b/ui/pages/password-reset/index.js index 93880b8190..cfaf16df56 100644 --- a/ui/pages/password-reset/index.js +++ b/ui/pages/password-reset/index.js @@ -13,6 +13,7 @@ export default function PasswordReset() { const [submitted, setSubmitted] = useState(false) async function onSubmit(e) { + setSubmitted(true) e.preventDefault() try { @@ -28,7 +29,6 @@ export default function PasswordReset() { } await res.json() - setSubmitted(true) } catch (e) { console.error(e) } @@ -41,7 +41,7 @@ export default function PasswordReset() { {token ? ( <>

- Please set your password + Please set your password.

Password Reset {submitted ? (

- Please check your email for the reset link + Please check your email for the reset link.

) : ( <>

- Please enter your email + Please enter your email.

{isEmailConfigured && ( - + I forgot my password From 59225697d00b00b3b17075ac3ed138e4ea7a040c Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Fri, 2 Sep 2022 15:48:32 -0700 Subject: [PATCH 5/7] improve: wording on login --- ui/pages/login/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/pages/login/index.js b/ui/pages/login/index.js index baaf35b763..78db139905 100644 --- a/ui/pages/login/index.js +++ b/ui/pages/login/index.js @@ -126,7 +126,7 @@ export default function Login() {

Login to Infra

Welcome back. Login with your credentials - {providers?.length > 0 && ' or via your identity provider'}. + {providers?.length > 0 && ' or with your identity provider'}.

{providers?.length > 0 && ( <> From 45dac6d665cd80bef65318a042806addf78f7748 Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Tue, 6 Sep 2022 10:46:50 -0700 Subject: [PATCH 6/7] maintain: update tests --- ui/__test__/login.test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/__test__/login.test.js b/ui/__test__/login.test.js index 9be7de9308..6ddba7d24f 100644 --- a/ui/__test__/login.test.js +++ b/ui/__test__/login.test.js @@ -68,10 +68,10 @@ describe('Login Component', () => { render() expect( - screen.queryByText('Welcome back. Login with your credentials') + screen.queryByText('Welcome back. Login with your credentials.') ).toBeInTheDocument() expect( - screen.queryByText('or via your identity provider.') + screen.queryByText('or with your identity provider.') ).not.toBeInTheDocument() }) @@ -82,7 +82,7 @@ describe('Login Component', () => { expect( screen.getByText( - 'Welcome back. Login with your credentials or via your identity provider.' + 'Welcome back. Login with your credentials or with your identity provider.' ) ).toBeInTheDocument() }) From fbc1e44d2c3b82b28a22ce8d510ff6fbfe76fe66 Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Wed, 7 Sep 2022 10:24:49 -0700 Subject: [PATCH 7/7] maintain: remove unused error state --- ui/pages/password-reset/index.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/ui/pages/password-reset/index.js b/ui/pages/password-reset/index.js index 5bb6230155..03ff3242e9 100644 --- a/ui/pages/password-reset/index.js +++ b/ui/pages/password-reset/index.js @@ -9,7 +9,6 @@ export default function PasswordReset() { const { token } = router.query const [email, setEmail] = useState('') - const [error, setError] = useState('') const [submitted, setSubmitted] = useState(false) async function onSubmit(e) { @@ -83,11 +82,8 @@ export default function PasswordReset() { placeholder='enter your email' onChange={e => { setEmail(e.target.value) - setError('') }} - className={`w-full border-b border-gray-800 bg-transparent px-px py-2 text-2xs placeholder:italic focus:border-b focus:border-gray-200 focus:outline-none ${ - error ? 'border-pink-500/60' : '' - }`} + className={`w-full border-b border-gray-800 bg-transparent px-px py-2 text-2xs placeholder:italic focus:border-b focus:border-gray-200 focus:outline-none`} />
- {error && ( -

- {error} -

- )} )}