mirror of
https://github.com/strapi/strapi.git
synced 2025-12-03 10:32:10 +00:00
Merge branch 'strapi:master' into feature/plugin-name-kebab
This commit is contained in:
commit
117dbcf4f3
@ -40,7 +40,7 @@ const UnauthenticatedLayout = ({ children }) => {
|
||||
<LocaleToggle />
|
||||
</Box>
|
||||
</Flex>
|
||||
<Box paddingTop={11} paddingBottom={11}>
|
||||
<Box paddingTop={2} paddingBottom={11}>
|
||||
{children}
|
||||
</Box>
|
||||
</div>
|
||||
|
||||
@ -33,7 +33,7 @@ describe('ADMIN | PAGES | AUTH | Oops', () => {
|
||||
}
|
||||
|
||||
.c9 {
|
||||
padding-top: 64px;
|
||||
padding-top: 8px;
|
||||
padding-bottom: 64px;
|
||||
}
|
||||
|
||||
|
||||
@ -143,7 +143,7 @@ const Register = ({ authType, fieldsToDisable, noSignin, onSubmit, schema }) =>
|
||||
<Typography as="h1" variant="alpha">
|
||||
{formatMessage({
|
||||
id: 'Auth.form.welcome.title',
|
||||
defaultMessage: 'Welcome!',
|
||||
defaultMessage: 'Welcome to Strapi!',
|
||||
})}
|
||||
</Typography>
|
||||
</Box>
|
||||
@ -152,12 +152,12 @@ const Register = ({ authType, fieldsToDisable, noSignin, onSubmit, schema }) =>
|
||||
{formatMessage({
|
||||
id: 'Auth.form.register.subtitle',
|
||||
defaultMessage:
|
||||
'Your credentials are only used to authenticate yourself on the admin panel. All saved data will be stored in your own database.',
|
||||
'Credentials are only used to authenticate in Strapi. All saved data will be stored in your database.',
|
||||
})}
|
||||
</Typography>
|
||||
</CenteredBox>
|
||||
</Column>
|
||||
<Stack spacing={7}>
|
||||
<Stack spacing={6}>
|
||||
<Grid gap={4}>
|
||||
<GridItem col={6}>
|
||||
<TextInput
|
||||
@ -227,7 +227,7 @@ const Register = ({ authType, fieldsToDisable, noSignin, onSubmit, schema }) =>
|
||||
hint={formatMessage({
|
||||
id: 'Auth.form.password.hint',
|
||||
defaultMessage:
|
||||
'Password must contain at least 8 characters, 1 uppercase, 1 lowercase and 1 number',
|
||||
'Must be at least 8 characters, 1 uppercase, 1 lowercase & 1 number',
|
||||
})}
|
||||
required
|
||||
label={formatMessage({
|
||||
@ -284,7 +284,7 @@ const Register = ({ authType, fieldsToDisable, noSignin, onSubmit, schema }) =>
|
||||
{
|
||||
id: 'Auth.form.register.news.label',
|
||||
defaultMessage:
|
||||
'Keep me updated about the new features and upcoming improvements (by doing this you accept the {terms} and the {policy}).',
|
||||
'Keep me updated about new features & upcoming improvements (by doing this you accept the {terms} and the {policy}).',
|
||||
},
|
||||
{
|
||||
terms: (
|
||||
|
||||
@ -38,7 +38,7 @@ describe('ADMIN | PAGES | AUTH | Register', () => {
|
||||
}
|
||||
|
||||
.c9 {
|
||||
padding-top: 64px;
|
||||
padding-top: 8px;
|
||||
padding-bottom: 64px;
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@ describe('ADMIN | PAGES | AUTH | Register', () => {
|
||||
}
|
||||
|
||||
.c21 > * + * {
|
||||
margin-top: 32px;
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
.c12:focus-visible {
|
||||
@ -876,7 +876,7 @@ describe('ADMIN | PAGES | AUTH | Register', () => {
|
||||
<h1
|
||||
class="c17"
|
||||
>
|
||||
Welcome!
|
||||
Welcome to Strapi!
|
||||
</h1>
|
||||
</div>
|
||||
<div
|
||||
@ -885,13 +885,13 @@ describe('ADMIN | PAGES | AUTH | Register', () => {
|
||||
<span
|
||||
class="c20"
|
||||
>
|
||||
Your credentials are only used to authenticate yourself on the admin panel. All saved data will be stored in your own database.
|
||||
Credentials are only used to authenticate in Strapi. All saved data will be stored in your database.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="c21"
|
||||
spacing="7"
|
||||
spacing="6"
|
||||
>
|
||||
<div
|
||||
class="c22"
|
||||
@ -1081,7 +1081,7 @@ describe('ADMIN | PAGES | AUTH | Register', () => {
|
||||
class="c37"
|
||||
id="textinput-4-hint"
|
||||
>
|
||||
Password must contain at least 8 characters, 1 uppercase, 1 lowercase and 1 number
|
||||
Must be at least 8 characters, 1 uppercase, 1 lowercase & 1 number
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -1164,7 +1164,7 @@ describe('ADMIN | PAGES | AUTH | Register', () => {
|
||||
<div
|
||||
class="c42"
|
||||
>
|
||||
Keep me updated about the new features and upcoming improvements (by doing this you accept the
|
||||
Keep me updated about new features & upcoming improvements (by doing this you accept the
|
||||
<a
|
||||
class="c43"
|
||||
href="https://strapi.io/terms"
|
||||
|
||||
@ -38,7 +38,7 @@ describe('ADMIN | PAGES | AUTH | ResetPassword', () => {
|
||||
}
|
||||
|
||||
.c9 {
|
||||
padding-top: 64px;
|
||||
padding-top: 8px;
|
||||
padding-bottom: 64px;
|
||||
}
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ describe('Admin | UseCasePage', () => {
|
||||
}
|
||||
|
||||
.c9 {
|
||||
padding-top: 64px;
|
||||
padding-top: 8px;
|
||||
padding-bottom: 64px;
|
||||
}
|
||||
|
||||
|
||||
@ -36,15 +36,15 @@
|
||||
"Auth.form.lastname.label": "Last name",
|
||||
"Auth.form.lastname.placeholder": "e.g. Doe",
|
||||
"Auth.form.password.hide-password": "Hide password",
|
||||
"Auth.form.password.hint": "Password must contain at least 8 characters, 1 uppercase, 1 lowercase, and 1 number",
|
||||
"Auth.form.password.hint": "Must be at least 8 characters, 1 uppercase, 1 lowercase & 1 number",
|
||||
"Auth.form.password.show-password": "Show password",
|
||||
"Auth.form.register.news.label": "Keep me updated about the new features and upcoming improvements (by doing this you accept the {terms} and the {policy}).",
|
||||
"Auth.form.register.subtitle": "Your credentials are only used to authenticate yourself on the admin panel. All saved data will be stored in your own database.",
|
||||
"Auth.form.register.news.label": "Keep me updated about new features & upcoming improvements (by doing this you accept the {terms} and the {policy}).",
|
||||
"Auth.form.register.subtitle": "Credentials are only used to authenticate in Strapi. All saved data will be stored in your database.",
|
||||
"Auth.form.rememberMe.label": "Remember me",
|
||||
"Auth.form.username.label": "Username",
|
||||
"Auth.form.username.placeholder": "e.g. Kai_Doe",
|
||||
"Auth.form.welcome.subtitle": "Log in to your Strapi account",
|
||||
"Auth.form.welcome.title": "Welcome!",
|
||||
"Auth.form.welcome.title": "Welcome to Strapi!",
|
||||
"Auth.link.forgot-password": "Forgot your password?",
|
||||
"Auth.link.ready": "Ready to sign in?",
|
||||
"Auth.link.signin": "Sign in",
|
||||
|
||||
@ -51,6 +51,15 @@ const GenericInput = ({
|
||||
// therefore we cast this case to undefined
|
||||
const value = defaultValue ?? undefined;
|
||||
|
||||
/*
|
||||
TODO: ideally we should pass in `defaultValue` and `value` for
|
||||
inputs, in order to make them controlled components. This variable
|
||||
acts as a fallback for now, to prevent React errors in devopment mode
|
||||
|
||||
See: https://github.com/strapi/strapi/pull/12861
|
||||
*/
|
||||
const valueWithEmptyStringFallback = value ?? '';
|
||||
|
||||
if (CustomInput) {
|
||||
return (
|
||||
<CustomInput
|
||||
@ -128,7 +137,7 @@ const GenericInput = ({
|
||||
id: 'app.components.ToggleCheckbox.on-label',
|
||||
defaultMessage: 'True',
|
||||
})}
|
||||
onChange={e => {
|
||||
onChange={(e) => {
|
||||
onChange({ target: { name, value: e.target.checked } });
|
||||
}}
|
||||
required={required}
|
||||
@ -144,7 +153,7 @@ const GenericInput = ({
|
||||
hint={hint}
|
||||
id={name}
|
||||
name={name}
|
||||
onValueChange={value => {
|
||||
onValueChange={(value) => {
|
||||
onChange({ target: { name, value } });
|
||||
}}
|
||||
required={required}
|
||||
@ -165,7 +174,7 @@ const GenericInput = ({
|
||||
id={name}
|
||||
hint={hint}
|
||||
name={name}
|
||||
onChange={date => {
|
||||
onChange={(date) => {
|
||||
const formattedDate = date.toISOString();
|
||||
|
||||
onChange({ target: { name, value: formattedDate, type } });
|
||||
@ -175,7 +184,7 @@ const GenericInput = ({
|
||||
placeholder={formattedPlaceholder}
|
||||
required={required}
|
||||
value={value && new Date(value)}
|
||||
selectedDateLabel={formattedDate => `Date picker, current is ${formattedDate}`}
|
||||
selectedDateLabel={(formattedDate) => `Date picker, current is ${formattedDate}`}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@ -196,7 +205,7 @@ const GenericInput = ({
|
||||
id={name}
|
||||
hint={hint}
|
||||
name={name}
|
||||
onChange={date => {
|
||||
onChange={(date) => {
|
||||
onChange({
|
||||
target: { name, value: formatISO(date, { representation: 'date' }), type },
|
||||
});
|
||||
@ -205,7 +214,7 @@ const GenericInput = ({
|
||||
placeholder={formattedPlaceholder}
|
||||
required={required}
|
||||
selectedDate={selectedDate}
|
||||
selectedDateLabel={formattedDate => `Date picker, current is ${formattedDate}`}
|
||||
selectedDateLabel={(formattedDate) => `Date picker, current is ${formattedDate}`}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@ -219,7 +228,7 @@ const GenericInput = ({
|
||||
id={name}
|
||||
hint={hint}
|
||||
name={name}
|
||||
onValueChange={value => {
|
||||
onValueChange={(value) => {
|
||||
onChange({ target: { name, value: value ?? null, type } });
|
||||
}}
|
||||
placeholder={formattedPlaceholder}
|
||||
@ -244,7 +253,7 @@ const GenericInput = ({
|
||||
placeholder={formattedPlaceholder}
|
||||
required={required}
|
||||
type="email"
|
||||
value={value}
|
||||
value={valueWithEmptyStringFallback}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@ -265,7 +274,7 @@ const GenericInput = ({
|
||||
placeholder={formattedPlaceholder}
|
||||
required={required}
|
||||
type="text"
|
||||
value={value}
|
||||
value={valueWithEmptyStringFallback}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@ -282,7 +291,7 @@ const GenericInput = ({
|
||||
defaultMessage: 'Show password',
|
||||
})}
|
||||
onClick={() => {
|
||||
setShowPassword(prev => !prev);
|
||||
setShowPassword((prev) => !prev);
|
||||
}}
|
||||
style={{
|
||||
border: 'none',
|
||||
@ -307,7 +316,7 @@ const GenericInput = ({
|
||||
placeholder={formattedPlaceholder}
|
||||
required={required}
|
||||
type={showPassword ? 'text' : 'password'}
|
||||
value={value}
|
||||
value={valueWithEmptyStringFallback}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@ -321,7 +330,7 @@ const GenericInput = ({
|
||||
id={name}
|
||||
hint={hint}
|
||||
name={name}
|
||||
onChange={value => {
|
||||
onChange={(value) => {
|
||||
onChange({ target: { name, value: value === '' ? null : value, type: 'select' } });
|
||||
}}
|
||||
placeholder={formattedPlaceholder}
|
||||
@ -352,7 +361,7 @@ const GenericInput = ({
|
||||
required={required}
|
||||
placeholder={formattedPlaceholder}
|
||||
type={type}
|
||||
value={value}
|
||||
value={valueWithEmptyStringFallback}
|
||||
>
|
||||
{value}
|
||||
</Textarea>
|
||||
@ -379,7 +388,7 @@ const GenericInput = ({
|
||||
id={name}
|
||||
hint={hint}
|
||||
name={name}
|
||||
onChange={time => {
|
||||
onChange={(time) => {
|
||||
onChange({ target: { name, value: `${time}`, type } });
|
||||
}}
|
||||
onClear={() => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user