Merge branch 'master' into cm/add-dz-description

This commit is contained in:
cyril lopez 2022-01-07 09:50:25 +01:00 committed by GitHub
commit c56bedea43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 3 deletions

View File

@ -80,12 +80,20 @@ const LeftMenu = ({ generalSectionLinks, pluginsSectionLinks }) => {
} }
}; };
const menuTitle = formatMessage({
id: 'app.components.LeftMenu.navbrand.title',
defaultMessage: 'Strapi Dashboard',
});
return ( return (
<MainNav condensed={condensed}> <MainNav condensed={condensed}>
<NavBrand <NavBrand
workplace="Workplace" workplace={formatMessage({
title="Strapi Dashboard" id: 'app.components.LeftMenu.navbrand.workplace',
icon={<img src={menuLogo} alt="Strapi Dashboard" />} defaultMessage: 'Workplace',
})}
title={menuTitle}
icon={<img src={menuLogo} alt={menuTitle} />}
/> />
<Divider /> <Divider />

View File

@ -26,6 +26,10 @@ const LabelAction = styled(Box)`
} }
`; `;
const TypographyAsterisk = styled(Typography)`
line-height: 0;
`;
const Wysiwyg = ({ const Wysiwyg = ({
description, description,
disabled, disabled,
@ -36,6 +40,7 @@ const Wysiwyg = ({
onChange, onChange,
placeholder, placeholder,
value, value,
required,
}) => { }) => {
const { formatMessage } = useIntl(); const { formatMessage } = useIntl();
const textareaRef = useRef(null); const textareaRef = useRef(null);
@ -124,6 +129,7 @@ const Wysiwyg = ({
<Stack horizontal size={1}> <Stack horizontal size={1}>
<Typography variant="pi" fontWeight="bold" textColor="neutral800"> <Typography variant="pi" fontWeight="bold" textColor="neutral800">
{label} {label}
{required && <TypographyAsterisk textColor="danger600">*</TypographyAsterisk>}
</Typography> </Typography>
{labelAction && <LabelAction paddingLeft={1}>{labelAction}</LabelAction>} {labelAction && <LabelAction paddingLeft={1}>{labelAction}</LabelAction>}
</Stack> </Stack>
@ -182,6 +188,7 @@ Wysiwyg.defaultProps = {
error: '', error: '',
labelAction: undefined, labelAction: undefined,
placeholder: null, placeholder: null,
required: false,
value: '', value: '',
}; };
@ -206,6 +213,7 @@ Wysiwyg.propTypes = {
defaultMessage: PropTypes.string.isRequired, defaultMessage: PropTypes.string.isRequired,
values: PropTypes.object, values: PropTypes.object,
}), }),
required: PropTypes.bool,
value: PropTypes.string, value: PropTypes.string,
}; };

View File

@ -284,6 +284,8 @@
"app.components.LeftMenu.expand": "Expand the navbar", "app.components.LeftMenu.expand": "Expand the navbar",
"app.components.LeftMenu.logout": "Logout", "app.components.LeftMenu.logout": "Logout",
"app.components.LeftMenu.profile": "Profile", "app.components.LeftMenu.profile": "Profile",
"app.components.LeftMenu.navbrand.title": "Strapi Dashboard",
"app.components.LeftMenu.navbrand.workplace": "Workplace",
"app.components.LeftMenuFooter.documentation": "Documentation", "app.components.LeftMenuFooter.documentation": "Documentation",
"app.components.LeftMenuFooter.help": "Help", "app.components.LeftMenuFooter.help": "Help",
"app.components.LeftMenuFooter.poweredBy": "Powered by ", "app.components.LeftMenuFooter.poweredBy": "Powered by ",