From 8b88e7914482bd53f105d498a3e09bfda1b7f9af Mon Sep 17 00:00:00 2001 From: Joshen Lim Date: Wed, 16 Nov 2022 17:16:13 +0800 Subject: [PATCH 1/4] Small updates to email logins --- .../SignIn/PasswordConditionsHelper.tsx | 12 ++-- .../interfaces/SignIn/SignInForm.tsx | 2 +- .../interfaces/SignIn/SignUpForm.tsx | 1 + studio/pages/account/me.tsx | 55 +++++++++---------- 4 files changed, 33 insertions(+), 37 deletions(-) diff --git a/studio/components/interfaces/SignIn/PasswordConditionsHelper.tsx b/studio/components/interfaces/SignIn/PasswordConditionsHelper.tsx index 98df3524fd0..a2436717341 100644 --- a/studio/components/interfaces/SignIn/PasswordConditionsHelper.tsx +++ b/studio/components/interfaces/SignIn/PasswordConditionsHelper.tsx @@ -11,11 +11,11 @@ const PasswordConditionsHelper = ({ password }: PasswordConditionsHelperProps) = return (
- - - - - + + + + +
) } @@ -31,7 +31,7 @@ const PasswordCondition = ({ title, isMet }: PasswordConditionProps) => { return (
diff --git a/studio/components/interfaces/SignIn/SignInForm.tsx b/studio/components/interfaces/SignIn/SignInForm.tsx index bf4874b23f1..6498075f943 100644 --- a/studio/components/interfaces/SignIn/SignInForm.tsx +++ b/studio/components/interfaces/SignIn/SignInForm.tsx @@ -61,7 +61,7 @@ const SignInForm = () => { return ui.setNotification({ id: toastId, category: 'error', - message: 'Please click the link sent to your email to confirm your account', + message: 'Account has not been verified, please check the link sent to your email', }) } diff --git a/studio/components/interfaces/SignIn/SignUpForm.tsx b/studio/components/interfaces/SignIn/SignUpForm.tsx index 88c5883a3bc..df461d12d0a 100644 --- a/studio/components/interfaces/SignIn/SignUpForm.tsx +++ b/studio/components/interfaces/SignIn/SignUpForm.tsx @@ -111,6 +111,7 @@ const SignUpForm = () => { + + +
+ + )} From 88e911608ba4d065656a473a9e33a644aa5622be Mon Sep 17 00:00:00 2001 From: Joshen Lim Date: Thu, 17 Nov 2022 12:22:41 +0800 Subject: [PATCH 2/4] Show password condition on focus --- studio/components/interfaces/SignIn/SignUpForm.tsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/studio/components/interfaces/SignIn/SignUpForm.tsx b/studio/components/interfaces/SignIn/SignUpForm.tsx index df461d12d0a..e7777da7377 100644 --- a/studio/components/interfaces/SignIn/SignUpForm.tsx +++ b/studio/components/interfaces/SignIn/SignUpForm.tsx @@ -16,6 +16,7 @@ const signUpSchema = passwordSchema.shape({ const SignUpForm = () => { const { ui } = useStore() const captchaRef = useRef(null) + const [showConditions, setShowConditions] = useState(false) const [isSubmitted, setIsSubmitted] = useState(false) const [passwordHidden, setPasswordHidden] = useState(true) const [captchaToken, setCaptchaToken] = useState(null) @@ -107,17 +108,24 @@ const SignUpForm = () => { placeholder="••••••••" disabled={isSubmitting} autoComplete="new-password" + onFocus={() => setShowConditions(true)} actions={