diff --git a/web/src/app/invitations/accept/page.tsx b/web/src/app/invitations/accept/page.tsx index 20eb93fa5..c2252c70e 100644 --- a/web/src/app/invitations/accept/page.tsx +++ b/web/src/app/invitations/accept/page.tsx @@ -92,7 +92,8 @@ export default function AcceptInvitationPage() { const [errorMessage, setErrorMessage] = useState(''); const [password, setPassword] = useState(''); const [confirmPassword, setConfirmPassword] = useState(''); - const [passwordRegistrationEnabled, setPasswordRegistrationEnabled] = useState(false); + const [passwordRegistrationEnabled, setPasswordRegistrationEnabled] = + useState(false); useEffect(() => { const handleHashChange = () => setInvitationHash(window.location.hash); @@ -109,9 +110,12 @@ export default function AcceptInvitationPage() { 'error', ); setToken(invitationToken); - backendClient.getAccountInfo().then((info) => { - setPasswordRegistrationEnabled(info.password_login_enabled !== false); - }).catch(() => setPasswordRegistrationEnabled(false)); + backendClient + .getAccountInfo() + .then((info) => { + setPasswordRegistrationEnabled(info.password_login_enabled !== false); + }) + .catch(() => setPasswordRegistrationEnabled(false)); if (!invitationToken) { setErrorMessage(t('workspace.invitationMissing')); setStatus('error'); @@ -398,7 +402,10 @@ export default function AcceptInvitationPage() { ) : ( - )} diff --git a/web/src/app/register/page.tsx b/web/src/app/register/page.tsx index fb155ac56..93e33ca7e 100644 --- a/web/src/app/register/page.tsx +++ b/web/src/app/register/page.tsx @@ -44,7 +44,8 @@ export default function Register() { const navigate = useNavigate(); const { t } = useTranslation(); const [spaceLoading, setSpaceLoading] = useState(false); - const [passwordRegistrationEnabled, setPasswordRegistrationEnabled] = useState(true); + const [passwordRegistrationEnabled, setPasswordRegistrationEnabled] = + useState(true); const form = useForm>>({ resolver: zodResolver(formSchema(t)), @@ -58,7 +59,9 @@ export default function Register() { getIsInitialized(); httpClient .getAccountInfo() - .then((info) => setPasswordRegistrationEnabled(info.password_login_enabled !== false)) + .then((info) => + setPasswordRegistrationEnabled(info.password_login_enabled !== false), + ) .catch(() => setPasswordRegistrationEnabled(true)); }, []); @@ -179,57 +182,60 @@ export default function Register() { {/* Local Account Registration */}
- - ( - - {t('common.email')} - -
- - -
-
- -
- )} - /> + + ( + + {t('common.email')} + +
+ + +
+
+ +
+ )} + /> - ( - - {t('common.password')} - -
- - -
-
- -
- )} - /> + ( + + {t('common.password')} + +
+ + +
+
+ +
+ )} + /> - +