diff --git a/app/client/src/ce/constants/messages.ts b/app/client/src/ce/constants/messages.ts index 6530978c72..39f3017c89 100644 --- a/app/client/src/ce/constants/messages.ts +++ b/app/client/src/ce/constants/messages.ts @@ -677,6 +677,9 @@ export const DISCONNECT_SERVICE_SUBHEADER = () => "Changes to this section can disrupt user authentication. Proceed with caution."; export const DISCONNECT_SERVICE_WARNING = () => "will be removed as primary method of authentication"; +export const AUTHENTICATION_METHOD_ENABLED = (methodName: string) => ` + ${methodName} authentication method is enabled +`; export const DISCONNECT_EXISTING_REPOSITORIES = () => "Disconnect existing Repositories"; @@ -1007,6 +1010,8 @@ export const ADMIN_AUTH_SETTINGS_TITLE = () => "Select Authentication Method"; export const ADMIN_AUTH_SETTINGS_SUBTITLE = () => "Select a protocol you want to authenticate users with"; export const DANGER_ZONE = () => "Danger Zone"; +export const DISCONNECT_AUTH_METHOD = () => "Disconnect"; +export const DISCONNECT_CONFIRMATION = () => "Are you sure?"; // Guided tour // -- STEPS --- diff --git a/app/client/src/ce/pages/AdminSettings/config/authentication/AuthPage.tsx b/app/client/src/ce/pages/AdminSettings/config/authentication/AuthPage.tsx index fb9e5a166c..a634eb4e62 100644 --- a/app/client/src/ce/pages/AdminSettings/config/authentication/AuthPage.tsx +++ b/app/client/src/ce/pages/AdminSettings/config/authentication/AuthPage.tsx @@ -11,6 +11,7 @@ import { EDIT, UPGRADE, UPGRADE_TO_EE, + AUTHENTICATION_METHOD_ENABLED, } from "@appsmith/constants/messages"; import { getAdminSettingsCategoryUrl } from "constants/routes"; import { Callout, CalloutType } from "components/ads/CalloutV2"; @@ -20,6 +21,8 @@ import { useSelector } from "react-redux"; import bootIntercom from "utils/bootIntercom"; import { Colors } from "constants/Colors"; import Icon from "components/ads/Icon"; +import TooltipComponent from "components/ads/Tooltip"; +import { Position } from "@blueprintjs/core"; const { intercomAppID } = getAppsmithConfigs(); @@ -122,7 +125,7 @@ const Label = styled.span<{ enterprise?: boolean }>` background: #fff; ` : ` - color: #03B365; + color: ${Colors.GREEN}; background: #E5F6EC; `}; padding: 0px 4px; @@ -170,7 +173,19 @@ export function AuthPage({ authMethods }: { authMethods: AuthMethodType[] }) { )} {method.isConnected && ( - + + + )} {method.subText} diff --git a/app/client/src/ce/pages/UserAuth/SignUp.tsx b/app/client/src/ce/pages/UserAuth/SignUp.tsx index 2b719cd8f6..dc5bd5efd6 100644 --- a/app/client/src/ce/pages/UserAuth/SignUp.tsx +++ b/app/client/src/ce/pages/UserAuth/SignUp.tsx @@ -94,6 +94,7 @@ export function SignUp(props: SignUpFormProps) { const { emailValue: email, error, pristine, submitting, valid } = props; const isFormValid = valid && email && !isEmptyString(email); const socialLoginList = ThirdPartyLoginRegistry.get(); + const shouldDisableSignupButton = pristine || !isFormValid; const location = useLocation(); const recaptchaStatus = useScript( @@ -119,6 +120,32 @@ export function SignUp(props: SignUpFormProps) { } } + const handleSubmit = (e: React.FormEvent) => { + e.preventDefault(); + const formElement: HTMLFormElement = document.getElementById( + "signup-form", + ) as HTMLFormElement; + if ( + googleRecaptchaSiteKey.enabled && + recaptchaStatus === ScriptStatus.READY + ) { + window.grecaptcha + .execute(googleRecaptchaSiteKey.apiKey, { + action: "submit", + }) + .then(function(token: any) { + formElement && + formElement.setAttribute( + "action", + `${signupURL}?recaptchaToken=${token}`, + ); + formElement && formElement.submit(); + }); + } else { + formElement && formElement.submit(); + } + }; + return ( <> {showError && } @@ -137,78 +164,57 @@ export function SignUp(props: SignUpFormProps) { {socialLoginList.length > 0 && ( )} - { - e.preventDefault(); - const formElement: HTMLFormElement = document.getElementById( - "signup-form", - ) as HTMLFormElement; - if ( - googleRecaptchaSiteKey.enabled && - recaptchaStatus === ScriptStatus.READY - ) { - window.grecaptcha - .execute(googleRecaptchaSiteKey.apiKey, { - action: "submit", - }) - .then(function(token: any) { - formElement && - formElement.setAttribute( - "action", - `${signupURL}?recaptchaToken=${token}`, - ); - formElement && formElement.submit(); - }); - } else { - formElement && formElement.submit(); - } - return false; - }} - > - handleSubmit(e)} > - - - - - - -