diff --git a/app/client/src/constants/DefaultTheme.tsx b/app/client/src/constants/DefaultTheme.tsx index b4ccba00d9..2b346a780d 100644 --- a/app/client/src/constants/DefaultTheme.tsx +++ b/app/client/src/constants/DefaultTheme.tsx @@ -749,11 +749,12 @@ const auth: any = { btnPrimary: "#F86A2B", inputBackground: darkShades[1], headingText: "#FFF", - link: "#457AE6", + link: "#106ba3", text: darkShades[7], placeholder: darkShades[5], socialBtnText: darkShades[8], socialBtnBorder: darkShades[8], + socialBtnHighlight: darkShades[1], }; const formMessage = { @@ -1434,13 +1435,13 @@ export const theme: Theme = { authCardHeader: { fontStyle: "normal", fontWeight: 600, - fontSize: 24, + fontSize: 25, lineHeight: 20, }, authCardSubheader: { fontStyle: "normal", fontWeight: "normal", - fontSize: 14, + fontSize: 15, lineHeight: 20, }, }, @@ -1593,9 +1594,9 @@ export const theme: Theme = { }, }, authCard: { - width: 400, + width: 440, dividerSpacing: 32, - formMessageWidth: 352, + formMessageWidth: 370, }, shadows: [ /* 0. tab */ diff --git a/app/client/src/constants/forms.ts b/app/client/src/constants/forms.ts index 35de679c5d..f172b65000 100644 --- a/app/client/src/constants/forms.ts +++ b/app/client/src/constants/forms.ts @@ -7,6 +7,7 @@ export const LOGIN_FORM_EMAIL_FIELD_NAME = "username"; export const LOGIN_FORM_PASSWORD_FIELD_NAME = "password"; export const SIGNUP_FORM_NAME = "SignupForm"; +export const SIGNUP_FORM_EMAIL_FIELD_NAME = "email"; export const FORGOT_PASSWORD_FORM_NAME = "ForgotPasswordForm"; export const RESET_PASSWORD_FORM_NAME = "ResetPasswordForm"; export const CREATE_PASSWORD_FORM_NAME = "CreatePasswordForm"; diff --git a/app/client/src/pages/UserAuth/Login.tsx b/app/client/src/pages/UserAuth/Login.tsx index b357127400..e8ce8f4e0b 100644 --- a/app/client/src/pages/UserAuth/Login.tsx +++ b/app/client/src/pages/UserAuth/Login.tsx @@ -14,7 +14,6 @@ import { LOGIN_PAGE_PASSWORD_INPUT_LABEL, LOGIN_PAGE_PASSWORD_INPUT_PLACEHOLDER, LOGIN_PAGE_EMAIL_INPUT_PLACEHOLDER, - FORM_VALIDATION_EMPTY_EMAIL, FORM_VALIDATION_EMPTY_PASSWORD, FORM_VALIDATION_INVALID_EMAIL, FORM_VALIDATION_INVALID_PASSWORD, @@ -53,16 +52,14 @@ const { enableGithubOAuth, enableGoogleOAuth } = getAppsmithConfigs(); const validate = (values: LoginFormValues) => { const errors: LoginFormValues = {}; - const email = values[LOGIN_FORM_EMAIL_FIELD_NAME]; + const email = values[LOGIN_FORM_EMAIL_FIELD_NAME] || ""; const password = values[LOGIN_FORM_PASSWORD_FIELD_NAME]; if (!password || isEmptyString(password)) { errors[LOGIN_FORM_PASSWORD_FIELD_NAME] = FORM_VALIDATION_EMPTY_PASSWORD; } else if (!isStrongPassword(password)) { errors[LOGIN_FORM_PASSWORD_FIELD_NAME] = FORM_VALIDATION_INVALID_PASSWORD; } - if (!email || isEmptyString(email)) { - errors[LOGIN_FORM_EMAIL_FIELD_NAME] = FORM_VALIDATION_EMPTY_EMAIL; - } else if (!isEmail(email)) { + if (!isEmptyString(email) && !isEmail(email)) { errors[LOGIN_FORM_EMAIL_FIELD_NAME] = FORM_VALIDATION_INVALID_EMAIL; } @@ -81,7 +78,8 @@ if (enableGoogleOAuth) SocialLoginList.push(SocialLoginTypes.GOOGLE); if (enableGithubOAuth) SocialLoginList.push(SocialLoginTypes.GITHUB); export const Login = (props: LoginFormProps) => { - const { error, valid } = props; + const { error, valid, emailValue: email } = props; + const isFormValid = valid && email && !isEmptyString(email); const location = useLocation(); const queryParams = new URLSearchParams(location.search); @@ -160,7 +158,7 @@ export const Login = (props: LoginFormProps) => {