From 0b5be6f28343e6de75c963c16076b6a3f5050210 Mon Sep 17 00:00:00 2001 From: joostdecock Date: Mon, 28 Aug 2023 08:40:39 +0200 Subject: [PATCH 1/2] wip(shared): Started on UX for Oauth signup --- sites/org/pages/index.mjs | 2 +- sites/shared/components/icons.mjs | 6 ++++++ sites/shared/components/susi/sign-up.mjs | 21 +++++++++++++++++---- sites/shared/i18n/signup/en.yaml | 1 + sites/shared/themes/dark.mjs | 2 +- 5 files changed, 26 insertions(+), 6 deletions(-) diff --git a/sites/org/pages/index.mjs b/sites/org/pages/index.mjs index 5142d202dc1..687337f7a02 100644 --- a/sites/org/pages/index.mjs +++ b/sites/org/pages/index.mjs @@ -89,7 +89,7 @@ const HomePage = ({ page }) => {
-
+
diff --git a/sites/shared/components/icons.mjs b/sites/shared/components/icons.mjs index fa0133407ef..9af2f853ce8 100644 --- a/sites/shared/components/icons.mjs +++ b/sites/shared/components/icons.mjs @@ -281,6 +281,12 @@ export const GuideIcon = (props) => ( ) +export const GoogleIcon = (props) => ( + + + +) + export const HeartIcon = (props) => ( diff --git a/sites/shared/components/susi/sign-up.mjs b/sites/shared/components/susi/sign-up.mjs index fa4e660a1a9..c5d2631dfd2 100644 --- a/sites/shared/components/susi/sign-up.mjs +++ b/sites/shared/components/susi/sign-up.mjs @@ -5,12 +5,12 @@ import { useTranslation } from 'next-i18next' // Context import { ModalContext } from 'shared/context/modal-context.mjs' // Dependencies -import { validateEmail, validateTld } from 'shared/utils.mjs' +import { validateEmail, validateTld, horFlexClasses } from 'shared/utils.mjs' // Components import Link from 'next/link' import { Robot } from 'shared/components/robot/index.mjs' import { EmailValidButton } from 'shared/components/buttons/email-valid-button.mjs' -import { LeftIcon, HelpIcon } from 'shared/components/icons.mjs' +import { LeftIcon, HelpIcon, GoogleIcon, GitHubIcon } from 'shared/components/icons.mjs' import { ModalWrapper } from 'shared/components/wrappers/modal.mjs' import { EmailInput } from 'shared/components/inputs.mjs' @@ -23,6 +23,9 @@ const DarkLink = ({ href, txt }) => ( ) +// FIXME: Hiding this now as it does nothing yet +const OAUTH = false + export const SignUp = () => { // Context const { setModal } = useContext(ModalContext) @@ -132,7 +135,7 @@ export const SignUp = () => { ) : ( <>

{t('toReceiveSignupLink')}:

-
+ { btnProps={{ type: 'submit' }} /> -

+ {OAUTH && ( +

+ {['Google', 'Github'].map((provider) => ( + + ))} +
+ )} +

{t('alreadyHaveAnAccount')} diff --git a/sites/shared/i18n/signup/en.yaml b/sites/shared/i18n/signup/en.yaml index caf1244e172..76600d34f6e 100644 --- a/sites/shared/i18n/signup/en.yaml +++ b/sites/shared/i18n/signup/en.yaml @@ -31,3 +31,4 @@ welcomeMigrateName: Welcome to FreeSewing v3 {name}. Please note that this is st v3UserAlreadyExists: Cannot migrate over an existing v3 account. Perhaps just sign in instead? tryAgain: Try again noWorkie: Unable to migrate this account. Typically that means your credentials are invalid. +signUpWithProvider: Sign up with {provider} diff --git a/sites/shared/themes/dark.mjs b/sites/shared/themes/dark.mjs index c4f5f360280..4a751f57c7e 100644 --- a/sites/shared/themes/dark.mjs +++ b/sites/shared/themes/dark.mjs @@ -23,7 +23,7 @@ export const theme = { accent: colors.fuchsia['400'], 'accent-focus': colors.fuchsia['300'], - 'accent-content': colors.fuchsia['900'], + 'accent-content': colors.neutral['900'], neutral: colors.neutral['900'], 'neutral-focus': colors.neutral['700'], From fc1ca11560fd4474a7845ffbfe7553d4d34e6b79 Mon Sep 17 00:00:00 2001 From: joostdecock Date: Mon, 28 Aug 2023 08:43:00 +0200 Subject: [PATCH 2/2] fix(org): Fix SSR config for docs --- sites/org/pages/docs/[...slug].mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sites/org/pages/docs/[...slug].mjs b/sites/org/pages/docs/[...slug].mjs index 453e54dbef2..c4a69dd90e3 100644 --- a/sites/org/pages/docs/[...slug].mjs +++ b/sites/org/pages/docs/[...slug].mjs @@ -84,6 +84,6 @@ export async function getStaticPaths() { ...somePaths.map((key) => `/nl/${key}`), ...somePaths.map((key) => `/uk/${key}`), ], - fallback: true, + fallback: false, } }