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 (
<MainNav condensed={condensed}>
<NavBrand
workplace="Workplace"
title="Strapi Dashboard"
icon={<img src={menuLogo} alt="Strapi Dashboard" />}
workplace={formatMessage({
id: 'app.components.LeftMenu.navbrand.workplace',
defaultMessage: 'Workplace',
})}
title={menuTitle}
icon={<img src={menuLogo} alt={menuTitle} />}
/>
<Divider />

View File

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

View File

@ -284,6 +284,8 @@
"app.components.LeftMenu.expand": "Expand the navbar",
"app.components.LeftMenu.logout": "Logout",
"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.help": "Help",
"app.components.LeftMenuFooter.poweredBy": "Powered by ",