@micha.bigler/ui-core-micha 1.4.7 → 1.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/LoginForm.js +1 -1
- package/dist/components/MfaLoginComponent.js +2 -2
- package/dist/components/PasswordSetForm.js +1 -1
- package/dist/components/ProfileComponent.js +1 -1
- package/dist/components/SocialLoginButtons.js +1 -1
- package/dist/i18n/authTranslations.js +1 -11
- package/dist/pages/AccountPage.js +1 -1
- package/dist/pages/SignUpPage.js +1 -1
- package/package.json +1 -1
- package/src/components/LoginForm.jsx +7 -5
- package/src/components/MfaLoginComponent.jsx +41 -27
- package/src/components/PasswordSetForm.jsx +1 -1
- package/src/components/ProfileComponent.jsx +1 -1
- package/src/components/SocialLoginButtons.jsx +1 -1
- package/src/i18n/authTranslations.js +1 -11
- package/src/pages/AccountPage.jsx +11 -9
- package/src/pages/SignUpPage.jsx +1 -1
|
@@ -18,6 +18,6 @@ disabled = false, }) => {
|
|
|
18
18
|
const supportsPasskey = !!onPasskeyLogin &&
|
|
19
19
|
typeof window !== 'undefined' &&
|
|
20
20
|
!!window.PublicKeyCredential;
|
|
21
|
-
return (_jsxs(Box, { sx: { display: 'flex', flexDirection: 'column', gap: 3 }, children: [error && (_jsx(Typography, { color: "error", gutterBottom: true, children: error })), supportsPasskey && (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "contained", fullWidth: true, type: "button", onClick: onPasskeyLogin, disabled: disabled, children: t('Auth.LOGIN_USE_PASSKEY_BUTTON') }), _jsx(Divider, { sx: { my: 2 }, children: t('Auth.LOGIN_OR') })] })), _jsxs(Box, { component: "form", onSubmit: handleSubmit, sx: { display: 'flex', flexDirection: 'column', gap: 2 }, children: [_jsx(TextField, { label: t('Auth.
|
|
21
|
+
return (_jsxs(Box, { sx: { display: 'flex', flexDirection: 'column', gap: 3 }, children: [error && (_jsx(Typography, { color: "error", gutterBottom: true, children: error })), supportsPasskey && (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "contained", fullWidth: true, type: "button", onClick: onPasskeyLogin, disabled: disabled, children: t('Auth.LOGIN_USE_PASSKEY_BUTTON') }), _jsx(Divider, { sx: { my: 2 }, children: t('Auth.LOGIN_OR') })] })), _jsxs(Box, { component: "form", onSubmit: handleSubmit, sx: { display: 'flex', flexDirection: 'column', gap: 2 }, children: [_jsx(TextField, { label: t('Auth.EMAIL_LABEL'), type: "email", required: true, fullWidth: true, value: identifier, onChange: (e) => setIdentifier(e.target.value), disabled: disabled }), _jsx(TextField, { label: t('Auth.LOGIN_PASSWORD_LABEL'), type: "password", required: true, fullWidth: true, value: password, onChange: (e) => setPassword(e.target.value), disabled: disabled }), _jsx(Button, { type: "submit", variant: "contained", fullWidth: true, disabled: disabled, children: t('Auth.LOGIN_SUBMIT') })] }), _jsxs(Box, { sx: { display: 'flex', flexDirection: 'column', gap: 3 }, children: [_jsx(Divider, { children: t('Auth.LOGIN_OR') }), _jsx(SocialLoginButtons, { onProviderClick: onSocialLogin })] }), _jsxs(Box, { children: [_jsx(Typography, { variant: "subtitle2", sx: { mb: 1 }, children: t('Auth.LOGIN_ACCOUNT_RECOVERY_TITLE') }), _jsxs(Box, { sx: { display: 'flex', gap: 1, flexWrap: 'wrap' }, children: [onSignUp && (_jsx(Button, { type: "button", variant: "outlined", onClick: onSignUp, disabled: disabled, children: t('Auth.LOGIN_SIGNUP_BUTTON') })), _jsx(Button, { type: "button", variant: "outlined", onClick: onForgotPassword, disabled: disabled, children: t('Auth.LOGIN_FORGOT_PASSWORD_BUTTON') })] })] })] }));
|
|
22
22
|
};
|
|
23
23
|
export default LoginForm;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
// src/auth/components/MfaLoginComponent.jsx
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
|
-
import { Box, Typography, TextField, Button, Stack, Alert, } from '@mui/material';
|
|
4
|
+
import { Box, Typography, TextField, Button, Stack, Alert, Divider, } from '@mui/material';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { authApi } from '../auth/authApi';
|
|
7
7
|
const MfaLoginComponent = ({ availableTypes, identifier, onSuccess, onCancel }) => {
|
|
@@ -67,6 +67,6 @@ const MfaLoginComponent = ({ availableTypes, identifier, onSuccess, onCancel })
|
|
|
67
67
|
setSubmitting(false);
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
|
-
return (_jsxs(Box, { children: [_jsx(Typography, { variant: "
|
|
70
|
+
return (_jsxs(Box, { children: [_jsx(Typography, { variant: "body2", sx: { mb: 2 }, children: t('Auth.MFA_SUBTITLE', 'Please confirm your login using one of the available methods.') }), errorKey && (_jsx(Alert, { severity: "error", sx: { mb: 2 }, children: t(errorKey) })), infoKey && (_jsx(Alert, { severity: "info", sx: { mb: 2 }, children: t(infoKey) })), _jsxs(Stack, { spacing: 2, children: [supportsWebauthn && (_jsx(Button, { variant: "contained", fullWidth: true, onClick: handlePasskey, disabled: submitting || helpRequested, children: t('Auth.LOGIN_USE_PASSKEY_BUTTON', 'Use passkey / security key') })), _jsx(Divider, { sx: { my: 2 }, children: t('Auth.LOGIN_OR') }), supportsTotpOrRecovery && (_jsxs(Box, { component: "form", onSubmit: handleSubmitCode, children: [_jsx(TextField, { label: t('Auth.MFA_CODE_LABEL', 'Authenticator code (or recovery code)'), value: code, onChange: (e) => setCode(e.target.value), fullWidth: true, disabled: submitting || helpRequested, autoComplete: "one-time-code", sx: { mb: 2 } }), _jsx(Button, { type: "submit", variant: "contained", fullWidth: true, disabled: submitting || !code.trim() || helpRequested, children: t('Auth.MFA_VERIFY', 'Verify') })] })), _jsx(Divider, { sx: { my: 2 }, children: t('Auth.LOGIN_OR') }), _jsxs(Stack, { direction: "row", spacing: 1, sx: { mt: 1 }, children: [_jsx(Button, { fullWidth: true, size: "small", variant: "outlined", onClick: onCancel, disabled: submitting, children: t('Auth.MFA_BACK_TO_LOGIN', 'Back to login') }), _jsx(Button, { fullWidth: true, size: "small", variant: "outlined", color: "secondary", onClick: handleNeedHelp, disabled: submitting || helpRequested, children: t('Auth.MFA_NEED_HELP', "I can't use any of these methods") })] })] })] }));
|
|
71
71
|
};
|
|
72
72
|
export default MfaLoginComponent;
|
|
@@ -27,7 +27,7 @@ const PasswordSetForm = ({ onSubmit, submitting = false }) => {
|
|
|
27
27
|
onSubmit(password1);
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
-
return (_jsxs(Box, { component: "form", onSubmit: handleSubmit, sx: { display: 'flex', flexDirection: 'column', gap: 2, mt: 2 }, children: [localErrorKey && (_jsx(Box, { sx: { color: 'error.main', fontSize: 14 }, children: t(localErrorKey) })), _jsx(TextField, { label: t('Auth.
|
|
30
|
+
return (_jsxs(Box, { component: "form", onSubmit: handleSubmit, sx: { display: 'flex', flexDirection: 'column', gap: 2, mt: 2 }, children: [localErrorKey && (_jsx(Box, { sx: { color: 'error.main', fontSize: 14 }, children: t(localErrorKey) })), _jsx(TextField, { label: t('Auth.NEW_PASSWORD_LABEL'), type: "password", fullWidth: true, autoComplete: "new-password", value: password1, onChange: (e) => setPassword1(e.target.value), disabled: submitting }), _jsx(TextField, { label: t('Auth.PASSWORD_CONFIRM_LABEL'), type: "password", fullWidth: true, autoComplete: "new-password", value: password2, onChange: (e) => setPassword2(e.target.value), disabled: submitting }), _jsx(Button, { type: "submit", variant: "contained", disabled: submitting, children: submitting
|
|
31
31
|
? t('Auth.PASSWORD_SET_BUTTON_LOADING')
|
|
32
32
|
: t('Auth.PASSWORD_SET_BUTTON') })] }));
|
|
33
33
|
};
|
|
@@ -104,6 +104,6 @@ showName = true, showPrivacy = true, showCookies = true, }) {
|
|
|
104
104
|
// - Sonst i18n-Schlüssel verwenden
|
|
105
105
|
const submitLabel = submitText || t('Profile.SAVE_BUTTON');
|
|
106
106
|
const submitLabelLoading = t('Profile.SAVE_BUTTON_LOADING');
|
|
107
|
-
return (_jsxs(Box, { component: "form", onSubmit: handleSubmit, sx: { maxWidth: 600, display: 'flex', flexDirection: 'column', gap: 2 }, children: [errorKey && (_jsx(Alert, { severity: "error", children: t(errorKey) })), successKey && (_jsx(Alert, { severity: "success", children: t(successKey) })), _jsxs(Stack, { spacing: 2, children: [_jsx(TextField, { label: t('Profile.USERNAME_LABEL'), value: username, fullWidth: true, disabled: true }), _jsx(TextField, { label: t('
|
|
107
|
+
return (_jsxs(Box, { component: "form", onSubmit: handleSubmit, sx: { maxWidth: 600, display: 'flex', flexDirection: 'column', gap: 2 }, children: [errorKey && (_jsx(Alert, { severity: "error", children: t(errorKey) })), successKey && (_jsx(Alert, { severity: "success", children: t(successKey) })), _jsxs(Stack, { spacing: 2, children: [_jsx(TextField, { label: t('Profile.USERNAME_LABEL'), value: username, fullWidth: true, disabled: true }), _jsx(TextField, { label: t('Auth.EMAIL_LABEL'), type: "email", value: email, fullWidth: true, disabled: true })] }), showName && (_jsxs(Stack, { spacing: 2, direction: { xs: 'column', sm: 'row' }, children: [_jsx(TextField, { label: t('Profile.FIRST_NAME_LABEL'), value: firstName, onChange: (e) => setFirstName(e.target.value), fullWidth: true }), _jsx(TextField, { label: t('Profile.LAST_NAME_LABEL'), value: lastName, onChange: (e) => setLastName(e.target.value), fullWidth: true })] })), (showPrivacy || showCookies) && (_jsxs(Box, { sx: { mt: 1 }, children: [_jsx(Typography, { variant: "subtitle1", gutterBottom: true, children: t('Profile.PRIVACY_SECTION_TITLE') }), _jsxs(Stack, { spacing: 1, children: [showPrivacy && (_jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: acceptedPrivacy, onChange: (e) => setAcceptedPrivacy(e.target.checked) }), label: t('Profile.ACCEPT_PRIVACY_LABEL') })), showCookies && (_jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: acceptedCookies, onChange: (e) => setAcceptedCookies(e.target.checked) }), label: t('Profile.ACCEPT_COOKIES_LABEL') }))] })] })), _jsx(Box, { sx: { mt: 2 }, children: _jsx(Button, { type: "submit", variant: "contained", disabled: saving, children: saving ? submitLabelLoading : submitLabel }) })] }));
|
|
108
108
|
}
|
|
109
109
|
export default ProfileComponent;
|
|
@@ -15,7 +15,7 @@ const SocialLoginButtons = ({ onProviderClick }) => {
|
|
|
15
15
|
onProviderClick(provider);
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
|
-
return (_jsxs(Stack, { spacing: 1.5,
|
|
18
|
+
return (_jsxs(Stack, { spacing: 1.5, children: [_jsx(Button, { variant: "outlined", fullWidth: true, onClick: () => handleClick(SOCIAL_PROVIDERS.google), startIcon: _jsx(Box, { sx: {
|
|
19
19
|
width: 24,
|
|
20
20
|
height: 24,
|
|
21
21
|
borderRadius: '50%',
|
|
@@ -281,7 +281,7 @@ export const authTranslations = {
|
|
|
281
281
|
"fr": "Saisissez votre adresse e-mail et le code d'accès pour demander une invitation.",
|
|
282
282
|
"en": "Enter your email address and access code to request an invitation."
|
|
283
283
|
},
|
|
284
|
-
"Auth.
|
|
284
|
+
"Auth.EMAIL_LABEL": {
|
|
285
285
|
"de": "E-Mail-Adresse",
|
|
286
286
|
"fr": "Adresse e-mail",
|
|
287
287
|
"en": "Email address"
|
|
@@ -406,11 +406,6 @@ export const authTranslations = {
|
|
|
406
406
|
"fr": "Impossible de supprimer le code d'accès.",
|
|
407
407
|
"en": "Could not delete access code."
|
|
408
408
|
},
|
|
409
|
-
"Auth.LOGIN_EMAIL_LABEL": {
|
|
410
|
-
"de": "E-Mail-Adresse",
|
|
411
|
-
"fr": "Adresse e-mail",
|
|
412
|
-
"en": "Email address"
|
|
413
|
-
},
|
|
414
409
|
"Auth.LOGIN_PASSWORD_LABEL": {
|
|
415
410
|
"de": "Passwort",
|
|
416
411
|
"fr": "Mot de passe",
|
|
@@ -706,11 +701,6 @@ export const authTranslations = {
|
|
|
706
701
|
"fr": "Nom d’utilisateur",
|
|
707
702
|
"en": "Username"
|
|
708
703
|
},
|
|
709
|
-
"Profile.EMAIL_LABEL": {
|
|
710
|
-
"de": "E-Mail",
|
|
711
|
-
"fr": "E-mail",
|
|
712
|
-
"en": "Email"
|
|
713
|
-
},
|
|
714
704
|
"Profile.FIRST_NAME_LABEL": {
|
|
715
705
|
"de": "Vorname",
|
|
716
706
|
"fr": "Prénom",
|
|
@@ -30,6 +30,6 @@ export function AccountPage() {
|
|
|
30
30
|
const updatedUser = await authApi.updateUserProfile(payload);
|
|
31
31
|
login(updatedUser);
|
|
32
32
|
};
|
|
33
|
-
return (_jsxs(WidePage, { title: "Account", children: [_jsx(Helmet, { children: _jsx("title", { children: "PROJECT_NAME \u2013 Account" }) }), _jsxs(Tabs, { value: tab, onChange: handleTabChange, sx: { mb: 3 }, children: [_jsx(Tab, { label: "
|
|
33
|
+
return (_jsxs(WidePage, { title: "Account", children: [_jsx(Helmet, { children: _jsx("title", { children: "PROJECT_NAME \u2013 Account" }) }), _jsxs(Tabs, { value: tab, onChange: handleTabChange, sx: { mb: 3 }, children: [_jsx(Tab, { label: "Security", value: "security" }), _jsx(Tab, { label: "Account", value: "account" }), _jsx(Tab, { label: "Support", value: "support" })] }), tab === 'security' && (_jsx(Box, { sx: { mt: 1 }, children: _jsx(SecurityComponent, { fromRecovery: fromRecovery, fromWeakLogin: fromWeakLogin }) })), tab === 'account' && (_jsx(Box, { sx: { mt: 1 }, children: _jsx(ProfileComponent, { onLoad: () => { }, onSubmit: handleProfileSubmit, submitText: "Save", showName: true, showPrivacy: true, showCookies: true }) })), tab === 'support' && (_jsx(Box, { sx: { mt: 1 }, children: _jsx(SupportRecoveryRequestsTab, {}) }))] }));
|
|
34
34
|
}
|
|
35
35
|
export default AccountPage;
|
package/dist/pages/SignUpPage.js
CHANGED
|
@@ -50,7 +50,7 @@ export function SignUpPage() {
|
|
|
50
50
|
const handleGoToLogin = () => {
|
|
51
51
|
navigate('/login');
|
|
52
52
|
};
|
|
53
|
-
return (_jsxs(NarrowPage, { title: t('Auth.PAGE_SIGNUP_TITLE'), subtitle: t('Auth.PAGE_SIGNUP_SUBTITLE'), children: [_jsx(Helmet, { children: _jsxs("title", { children: [t('App.NAME'), " \u2013 ", t('Auth.PAGE_SIGNUP_TITLE')] }) }), successKey && (_jsx(Alert, { severity: "success", sx: { mb: 2 }, children: t(successKey, { email }) })), errorKey && (_jsx(Alert, { severity: "error", sx: { mb: 2 }, children: t(errorKey) })), _jsxs(Box, { component: "form", onSubmit: handleSubmit, sx: { display: 'flex', flexDirection: 'column', gap: 2 }, children: [_jsx(TextField, { label: t('Auth.
|
|
53
|
+
return (_jsxs(NarrowPage, { title: t('Auth.PAGE_SIGNUP_TITLE'), subtitle: t('Auth.PAGE_SIGNUP_SUBTITLE'), children: [_jsx(Helmet, { children: _jsxs("title", { children: [t('App.NAME'), " \u2013 ", t('Auth.PAGE_SIGNUP_TITLE')] }) }), successKey && (_jsx(Alert, { severity: "success", sx: { mb: 2 }, children: t(successKey, { email }) })), errorKey && (_jsx(Alert, { severity: "error", sx: { mb: 2 }, children: t(errorKey) })), _jsxs(Box, { component: "form", onSubmit: handleSubmit, sx: { display: 'flex', flexDirection: 'column', gap: 2 }, children: [_jsx(TextField, { label: t('Auth.EMAIL_LABEL'), type: "email", required: true, fullWidth: true, value: email, onChange: (e) => setEmail(e.target.value), disabled: submitting }), _jsx(TextField, { label: t('Auth.SIGNUP_ACCESS_CODE_LABEL'), type: "text", required: true, fullWidth: true, value: accessCode, onChange: (e) => setAccessCode(e.target.value), disabled: submitting }), _jsx(Button, { type: "submit", variant: "contained", disabled: submitting, children: submitting
|
|
54
54
|
? t('Auth.SIGNUP_SUBMITTING')
|
|
55
55
|
: t('Auth.SIGNUP_SUBMIT') })] }), _jsx(Box, { sx: { mt: 3 }, children: _jsxs(Typography, { variant: "body2", children: [t('Auth.SIGNUP_ALREADY_HAVE_ACCOUNT'), ' ', _jsx(Button, { onClick: handleGoToLogin, variant: "text", size: "small", children: t('Auth.SIGNUP_GO_TO_LOGIN') })] }) })] }));
|
|
56
56
|
}
|
package/package.json
CHANGED
|
@@ -69,7 +69,7 @@ const LoginForm = ({
|
|
|
69
69
|
sx={{ display: 'flex', flexDirection: 'column', gap: 2 }}
|
|
70
70
|
>
|
|
71
71
|
<TextField
|
|
72
|
-
label={t('Auth.
|
|
72
|
+
label={t('Auth.EMAIL_LABEL')}
|
|
73
73
|
type="email"
|
|
74
74
|
required
|
|
75
75
|
fullWidth
|
|
@@ -96,13 +96,15 @@ const LoginForm = ({
|
|
|
96
96
|
>
|
|
97
97
|
{t('Auth.LOGIN_SUBMIT')}
|
|
98
98
|
</Button>
|
|
99
|
+
|
|
100
|
+
|
|
99
101
|
</Box>
|
|
100
102
|
|
|
101
103
|
{/* Other ways to sign in */}
|
|
102
|
-
|
|
103
|
-
<
|
|
104
|
-
{t('Auth.
|
|
105
|
-
</
|
|
104
|
+
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 3 }}>
|
|
105
|
+
<Divider>
|
|
106
|
+
{t('Auth.LOGIN_OR')}
|
|
107
|
+
</Divider>
|
|
106
108
|
<SocialLoginButtons onProviderClick={onSocialLogin} />
|
|
107
109
|
</Box>
|
|
108
110
|
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
Button,
|
|
8
8
|
Stack,
|
|
9
9
|
Alert,
|
|
10
|
+
Divider,
|
|
10
11
|
} from '@mui/material';
|
|
11
12
|
import { useTranslation } from 'react-i18next';
|
|
12
13
|
import { authApi } from '../auth/authApi';
|
|
@@ -79,9 +80,6 @@ const MfaLoginComponent = ({ availableTypes, identifier, onSuccess, onCancel })
|
|
|
79
80
|
|
|
80
81
|
return (
|
|
81
82
|
<Box>
|
|
82
|
-
<Typography variant="h6" gutterBottom>
|
|
83
|
-
{t('Auth.MFA_TITLE', 'Additional verification required')}
|
|
84
|
-
</Typography>
|
|
85
83
|
<Typography variant="body2" sx={{ mb: 2 }}>
|
|
86
84
|
{t(
|
|
87
85
|
'Auth.MFA_SUBTITLE',
|
|
@@ -102,6 +100,21 @@ const MfaLoginComponent = ({ availableTypes, identifier, onSuccess, onCancel })
|
|
|
102
100
|
)}
|
|
103
101
|
|
|
104
102
|
<Stack spacing={2}>
|
|
103
|
+
{supportsWebauthn && (
|
|
104
|
+
<Button
|
|
105
|
+
variant="contained"
|
|
106
|
+
fullWidth
|
|
107
|
+
onClick={handlePasskey}
|
|
108
|
+
disabled={submitting || helpRequested}
|
|
109
|
+
>
|
|
110
|
+
{t('Auth.LOGIN_USE_PASSKEY_BUTTON', 'Use passkey / security key')}
|
|
111
|
+
</Button>
|
|
112
|
+
)}
|
|
113
|
+
|
|
114
|
+
<Divider sx={{ my: 2 }}>
|
|
115
|
+
{t('Auth.LOGIN_OR')}
|
|
116
|
+
</Divider>
|
|
117
|
+
|
|
105
118
|
{supportsTotpOrRecovery && (
|
|
106
119
|
<Box component="form" onSubmit={handleSubmitCode}>
|
|
107
120
|
<TextField
|
|
@@ -127,36 +140,37 @@ const MfaLoginComponent = ({ availableTypes, identifier, onSuccess, onCancel })
|
|
|
127
140
|
</Box>
|
|
128
141
|
)}
|
|
129
142
|
|
|
130
|
-
{
|
|
143
|
+
<Divider sx={{ my: 2 }}>
|
|
144
|
+
{t('Auth.LOGIN_OR')}
|
|
145
|
+
</Divider>
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
<Stack direction="row" spacing={1} sx={{ mt: 1 }}>
|
|
131
150
|
<Button
|
|
151
|
+
fullWidth
|
|
152
|
+
size="small"
|
|
132
153
|
variant="outlined"
|
|
154
|
+
onClick={onCancel}
|
|
155
|
+
disabled={submitting}
|
|
156
|
+
>
|
|
157
|
+
{t('Auth.MFA_BACK_TO_LOGIN', 'Back to login')}
|
|
158
|
+
</Button>
|
|
159
|
+
|
|
160
|
+
<Button
|
|
133
161
|
fullWidth
|
|
134
|
-
|
|
162
|
+
size="small"
|
|
163
|
+
variant="outlined"
|
|
164
|
+
color="secondary"
|
|
165
|
+
onClick={handleNeedHelp}
|
|
135
166
|
disabled={submitting || helpRequested}
|
|
136
167
|
>
|
|
137
|
-
{t(
|
|
168
|
+
{t(
|
|
169
|
+
'Auth.MFA_NEED_HELP',
|
|
170
|
+
"I can't use any of these methods",
|
|
171
|
+
)}
|
|
138
172
|
</Button>
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
<Button
|
|
142
|
-
size="small"
|
|
143
|
-
onClick={onCancel}
|
|
144
|
-
disabled={submitting}
|
|
145
|
-
>
|
|
146
|
-
{t('Auth.MFA_BACK_TO_LOGIN', 'Back to login')}
|
|
147
|
-
</Button>
|
|
148
|
-
|
|
149
|
-
<Button
|
|
150
|
-
size="small"
|
|
151
|
-
color="secondary"
|
|
152
|
-
onClick={handleNeedHelp}
|
|
153
|
-
disabled={submitting || helpRequested}
|
|
154
|
-
>
|
|
155
|
-
{t(
|
|
156
|
-
'Auth.MFA_NEED_HELP',
|
|
157
|
-
"I can't use any of these methods",
|
|
158
|
-
)}
|
|
159
|
-
</Button>
|
|
173
|
+
</Stack>
|
|
160
174
|
</Stack>
|
|
161
175
|
</Box>
|
|
162
176
|
);
|
|
@@ -320,7 +320,7 @@ export const authTranslations = {
|
|
|
320
320
|
"en": "Enter your email address and access code to request an invitation."
|
|
321
321
|
},
|
|
322
322
|
|
|
323
|
-
"Auth.
|
|
323
|
+
"Auth.EMAIL_LABEL": {
|
|
324
324
|
"de": "E-Mail-Adresse",
|
|
325
325
|
"fr": "Adresse e-mail",
|
|
326
326
|
"en": "Email address"
|
|
@@ -449,11 +449,6 @@ export const authTranslations = {
|
|
|
449
449
|
"fr": "Impossible de supprimer le code d'accès.",
|
|
450
450
|
"en": "Could not delete access code."
|
|
451
451
|
},
|
|
452
|
-
"Auth.LOGIN_EMAIL_LABEL": {
|
|
453
|
-
"de": "E-Mail-Adresse",
|
|
454
|
-
"fr": "Adresse e-mail",
|
|
455
|
-
"en": "Email address"
|
|
456
|
-
},
|
|
457
452
|
"Auth.LOGIN_PASSWORD_LABEL": {
|
|
458
453
|
"de": "Passwort",
|
|
459
454
|
"fr": "Mot de passe",
|
|
@@ -753,11 +748,6 @@ export const authTranslations = {
|
|
|
753
748
|
"fr": "Nom d’utilisateur",
|
|
754
749
|
"en": "Username"
|
|
755
750
|
},
|
|
756
|
-
"Profile.EMAIL_LABEL": {
|
|
757
|
-
"de": "E-Mail",
|
|
758
|
-
"fr": "E-mail",
|
|
759
|
-
"en": "Email"
|
|
760
|
-
},
|
|
761
751
|
"Profile.FIRST_NAME_LABEL": {
|
|
762
752
|
"de": "Vorname",
|
|
763
753
|
"fr": "Prénom",
|
|
@@ -48,11 +48,20 @@ export function AccountPage() {
|
|
|
48
48
|
onChange={handleTabChange}
|
|
49
49
|
sx={{ mb: 3 }}
|
|
50
50
|
>
|
|
51
|
-
<Tab label="Account" value="account" />
|
|
52
51
|
<Tab label="Security" value="security" />
|
|
52
|
+
<Tab label="Account" value="account" />
|
|
53
53
|
<Tab label="Support" value="support" />
|
|
54
54
|
</Tabs>
|
|
55
55
|
|
|
56
|
+
{tab === 'security' && (
|
|
57
|
+
<Box sx={{ mt: 1 }}>
|
|
58
|
+
<SecurityComponent
|
|
59
|
+
fromRecovery={fromRecovery}
|
|
60
|
+
fromWeakLogin={fromWeakLogin}
|
|
61
|
+
/>
|
|
62
|
+
</Box>
|
|
63
|
+
)}
|
|
64
|
+
|
|
56
65
|
{tab === 'account' && (
|
|
57
66
|
<Box sx={{ mt: 1 }}>
|
|
58
67
|
<ProfileComponent
|
|
@@ -66,14 +75,7 @@ export function AccountPage() {
|
|
|
66
75
|
</Box>
|
|
67
76
|
)}
|
|
68
77
|
|
|
69
|
-
|
|
70
|
-
<Box sx={{ mt: 1 }}>
|
|
71
|
-
<SecurityComponent
|
|
72
|
-
fromRecovery={fromRecovery}
|
|
73
|
-
fromWeakLogin={fromWeakLogin}
|
|
74
|
-
/>
|
|
75
|
-
</Box>
|
|
76
|
-
)}
|
|
78
|
+
|
|
77
79
|
|
|
78
80
|
{tab === 'support' && (
|
|
79
81
|
<Box sx={{ mt: 1 }}>
|
package/src/pages/SignUpPage.jsx
CHANGED