diff --git a/frontend/public/locales/en/login.json b/frontend/public/locales/en/login.json index 75b56a014..49ef6cf2e 100644 --- a/frontend/public/locales/en/login.json +++ b/frontend/public/locales/en/login.json @@ -6,5 +6,7 @@ "need-account": "Need an Infisical account?", "create-account": "Create an account", "forgot-password": "Forgot your password?", - "error-login": "Wrong credentials." + "error-login": "Wrong credentials.", + "continue-with-google": "Continue with Google", + "continue-with-email": "Continue with Email" } diff --git a/frontend/public/locales/en/signup.json b/frontend/public/locales/en/signup.json index 5fa5742e3..4a66f702d 100644 --- a/frontend/public/locales/en/signup.json +++ b/frontend/public/locales/en/signup.json @@ -1,4 +1,8 @@ { + "initial-title": "Create your Infisical account", + "continue-with-google": "Continue with Google", + "continue-with-email": "Continue with Email", + "create-policy": "By signing up, you agree to our Terms of Service and Privacy Policy.", "title": "Sign Up", "og-title": "Replace .env files with 1 line of code. Sign Up for Infisical in 3 minutes.", "og-description": "Infisical a simple end-to-end encrypted platform that enables teams to sync and manage API-keys and environemntal variables. Works with Node.js, Next.js, Gatsby, Nest.js...", diff --git a/frontend/src/components/login/InitialLoginStep.tsx b/frontend/src/components/login/InitialLoginStep.tsx new file mode 100644 index 000000000..3e5ffba33 --- /dev/null +++ b/frontend/src/components/login/InitialLoginStep.tsx @@ -0,0 +1,36 @@ +import { useTranslation } from 'react-i18next'; +import Link from 'next/link'; + +import { getTranslatedStaticProps } from '@app/components/utilities/withTranslateProps'; + +export default function InitialLoginStep({ + setIsLoginWithEmail, +}: { + setIsLoginWithEmail: (value: boolean) => void; +}) { + + const { t } = useTranslation(); + + return
+

Login to Infisical

+
+ +
+
+ +
+ +

{t('login:create-account')}

+ +
+} + +export const getStaticProps = getTranslatedStaticProps(['login']); diff --git a/frontend/src/components/login/PasswordInputStep.tsx b/frontend/src/components/login/PasswordInputStep.tsx index d817fea24..c85fe6d1d 100644 --- a/frontend/src/components/login/PasswordInputStep.tsx +++ b/frontend/src/components/login/PasswordInputStep.tsx @@ -121,7 +121,7 @@ export default function PasswordInputStep({ type="button" className="ml-1.5 text-sm font-normal text-primary-700 underline-offset-4 duration-200 hover:text-primary" > - Log in with other options. + Login with other option diff --git a/frontend/src/components/signup/InitialSignupStep.tsx b/frontend/src/components/signup/InitialSignupStep.tsx new file mode 100644 index 000000000..b859ddd46 --- /dev/null +++ b/frontend/src/components/signup/InitialSignupStep.tsx @@ -0,0 +1,36 @@ +import { useTranslation } from 'react-i18next'; +import Link from 'next/link'; + +import { getTranslatedStaticProps } from '@app/components/utilities/withTranslateProps'; + +export default function InitialSignupStep({ + setIsSignupWithEmail, +}: { + setIsSignupWithEmail: (value: boolean) => void +}) { + const { t } = useTranslation(); + + return
+

{t('signup:initial-title')}

+
+ +
+
+ +
+ {t('signup:create-policy')} + +

{t('signup:already-have-account')}

+ +
+} + +export const getStaticProps = getTranslatedStaticProps(['signup']); diff --git a/frontend/src/pages/login.tsx b/frontend/src/pages/login.tsx index bc39198c6..2be66ce61 100644 --- a/frontend/src/pages/login.tsx +++ b/frontend/src/pages/login.tsx @@ -6,6 +6,7 @@ import { useRouter } from 'next/router'; import { useTranslation } from 'next-i18next'; import ListBox from '@app/components/basic/Listbox'; +import InitialLoginStep from '@app/components/login/InitialLoginStep'; import LoginStep from '@app/components/login/LoginStep'; import MFAStep from '@app/components/login/MFAStep'; import PasswordInputStep from '@app/components/login/PasswordInputStep'; @@ -78,20 +79,7 @@ export default function Login() { } if (!isLoginWithEmail && loginStep === 1) { - return ( - <> - - - - ) + return } if (step === 2) { @@ -105,7 +93,7 @@ export default function Login() { } return ( -
+
{t('common:head-title', { title: t('login:title') })} diff --git a/frontend/src/pages/signup.tsx b/frontend/src/pages/signup.tsx index ea3715901..645ef96aa 100644 --- a/frontend/src/pages/signup.tsx +++ b/frontend/src/pages/signup.tsx @@ -9,6 +9,7 @@ import { useTranslation } from 'next-i18next'; import CodeInputStep from '@app/components/signup/CodeInputStep'; import DownloadBackupPDF from '@app/components/signup/DonwloadBackupPDFStep'; import EnterEmailStep from '@app/components/signup/EnterEmailStep'; +import InitialSignupStep from '@app/components/signup/InitialSignupStep'; import TeamInviteStep from '@app/components/signup/TeamInviteStep'; import UserInfoStep from '@app/components/signup/UserInfoStep'; import SecurityClient from '@app/components/utilities/SecurityClient'; @@ -19,7 +20,6 @@ import { useProviderAuth } from '@app/hooks/useProviderAuth'; import checkEmailVerificationCode from './api/auth/CheckEmailVerificationCode'; import getWorkspaces from './api/workspace/getWorkspaces'; - /** * @returns the signup page */ @@ -96,20 +96,7 @@ export default function SignUp() { } if (!isSignupWithEmail && registerStep === 1) { - return ( - <> - - - - ) + return } if (registerStep === 2) { @@ -158,7 +145,7 @@ export default function SignUp() { } return ( -
+
{t('common:head-title', { title: t('signup:title') })} @@ -166,16 +153,14 @@ export default function SignUp() { -
- -
- Infisical Wide Logo -
- -
e.preventDefault()}> - {renderView(step)} -
-
+ +
+ long logo +
+ +
e.preventDefault()}> + {renderView(step)} +
); }