-
- {t('signUp')}
+
Account Inactive
+
You must activate your account via the signup link we sent you.
+
If you cannot find the link, you can receive a new one by signing up again.
+
+
+ Sign Up
@@ -75,36 +79,42 @@ const AccountInactive = ({ Link, banner }) => {
const AccountDisabled = ({ banner }) => (
{banner}
- {t('accountDisabled')}
- {t('accountDisabledMsg')}
-
+ Acccount Disabled
+
+ You cannot re-enable a disabled account. You need to contact support to resolve this
+ situation.
+
+
)
const AccountProhibited = ({ banner }) => (
{banner}
- {t('accountProhibited')}
- {t('accountProhibitedMsg')}
-
+ Your account has been disabled
+ Your account has been administratively disabled.
+
)
-const AccountStatusUnknown = ({ t, banner }) => (
+const AccountStatusUnknown = ({ banner }) => (
{banner}
- {t('statusUnknown')}
- {t('statusUnknownMsg')}
-
+ Account status warning
+ Your account status prohibits us from processing your data. Please contact support.
+
)
const RoleLacking = ({ t, requiredRole, role, banner }) => (
{banner}
- {t('roleLacking')}
-
-
+ You lack the required role to access this content
+
+ This content requires the {requiredRole} role. Your role is {role} which does
+ not grant you access to this content.
+
+
)
@@ -132,7 +142,7 @@ const ConsentLacking = ({ banner, refresh }) => {
return (
-
+
{banner}
@@ -140,8 +150,6 @@ const ConsentLacking = ({ banner, refresh }) => {
)
}
-const t = (input) => input
-
export const RoleBlock = ({ children, user = false, Link = false }) => {
if (!Link) Link = DefaultLink
let requiredRole = 'admin'
@@ -181,9 +189,8 @@ export const RoleBlock = ({ children, user = false, Link = false }) => {
} else {
if (data?.error?.error) setError(data.error.error)
else {
- console.log('WOULD SIGN OUT', data)
+ signOut()
}
- //else signOut()
}
setReady(true)
}
@@ -200,26 +207,20 @@ export const RoleBlock = ({ children, user = false, Link = false }) => {
setError(false)
}
- if (!ready)
- return (
- <>
-
not ready
-
- >
- )
+ if (!ready) return
const banner = impersonating ? (
-
-
+
+
Hi {impersonating.admin}, you are currently impersonating {impersonating.user}
-
) : null
- const childProps = { t, banner }
+ const childProps = { banner }
if (!token || !account.username) return
if (error) {
diff --git a/packages/react/components/SignIn/index.mjs b/packages/react/components/SignIn/index.mjs
index 26e4d2c4dfc..e78891d454c 100644
--- a/packages/react/components/SignIn/index.mjs
+++ b/packages/react/components/SignIn/index.mjs
@@ -19,6 +19,7 @@ import {
UserIcon,
} from '@freesewing/react/components/Icon'
import { MfaInput, StringInput, PasswordInput } from '@freesewing/react/components/Input'
+import { H1, H2, H3, H4 } from '@freesewing/react/components/Heading'
/*
* This SignIn component holds the entire sign-in form
@@ -126,43 +127,49 @@ export const SignIn = ({ onSuccess = false }) => {
}
}
- const btnClasses = `daisy-btn capitalize w-full mt-4 ${
- signInFailed ? 'daisy-btn-warning' : 'daisy-btn-primary'
- } transition-colors ease-in-out duration-300 ${horFlexClasses}`
+ const btnClasses = `tw-daisy-btn tw-capitalize tw-w-full tw-mt-4 ${
+ signInFailed ? 'tw-daisy-btn-warning' : 'tw-daisy-btn-primary'
+ } tw-transition-colors tw-ease-in-out tw-duration-300 ${horFlexClassesNoSm}`
const noBueno = (
<>
- {signInFailed}
+ {signInFailed}
>
)
if (magicLinkSent)
return (
- <>
- Email Sent
-
+
+ Email Sent
+
Go check your inbox for an email from FreeSewing.org
-
+
Click the sign-in link in that email to sign in to your FreeSewing account.
-
-
setMagicLinkSent(false)}>
+
+ setMagicLinkSent(false)}
+ >
Back
-
+
Contact support
- >
+
)
if (mfa)
return (
- <>
- MFA Code
-
+
+ MFA Code
+
Please provide a one-time MFA code, or a backup scratch code
{
noBueno
) : (
<>
-
+
- Sign In
-
+ Sign In
+
>
)}
-
-
setMfa(false)}>
+
+ setMfa(false)}>
Back
-
+
Contact support
- >
+
)
return (
-
-
{seenBefore ? `Welcome back ${seenUser}` : 'Welcome'}
-
Sign in to FreeSewing
+
+ {seenBefore ? `Welcome back ${seenUser}` : 'Welcome'}
+ Sign in to FreeSewing
{!seenBefore && (
{
)}
{magicLink ? (
{
noBueno
) : (
<>
-
+
- Email me a sign-in link
-
+ Email me a sign-in link
+
>
@@ -244,11 +251,11 @@ export const SignIn = ({ onSuccess = false }) => {
noBueno
) : (
<>
-
+
- Sign in
-
+ Sign in
+
>
@@ -257,19 +264,19 @@ export const SignIn = ({ onSuccess = false }) => {
>
)}
setMagicLink(!magicLink)}
>
- {magicLink ? : }
+ {magicLink ? : }
{magicLink ? 'Use your password' : 'Email me a sign-in link'}
- {magicLink ? : }
+ {magicLink ? : }
-
+
{['Google', 'Github'].map((provider) => (
initOauth(provider)}
>
{provider === 'Google' ? : }
@@ -279,7 +286,7 @@ export const SignIn = ({ onSuccess = false }) => {
{seenBefore ? (
setSeenUser(false)}
>
@@ -287,13 +294,15 @@ export const SignIn = ({ onSuccess = false }) => {
) : (
-
+
Sign up here
)}
-
+
)
}
+
+const WrapForm = ({ children }) =>
{children}