mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 17:00:55 +00:00
Use display in CM
Signed-off-by: soupette <cyril@strapi.io>
This commit is contained in:
parent
6fdca2407c
commit
89af979af4
@ -26,12 +26,12 @@ const Category = ({ category, components, isOdd, isOpen, onAddComponent, onToggl
|
|||||||
<AccordionContent>
|
<AccordionContent>
|
||||||
<Box paddingTop={4} paddingBottom={4} paddingLeft={3} paddingRight={3}>
|
<Box paddingTop={4} paddingBottom={4} paddingLeft={3} paddingRight={3}>
|
||||||
<Grid>
|
<Grid>
|
||||||
{components.map(({ componentUid, info: { label, icon, name } }) => {
|
{components.map(({ componentUid, info: { displayName, icon } }) => {
|
||||||
return (
|
return (
|
||||||
<ComponentCard
|
<ComponentCard
|
||||||
key={componentUid}
|
key={componentUid}
|
||||||
componentUid={componentUid}
|
componentUid={componentUid}
|
||||||
intlLabel={{ id: label || name, defaultMessage: label || name }}
|
intlLabel={{ id: displayName, defaultMessage: displayName }}
|
||||||
icon={icon}
|
icon={icon}
|
||||||
onClick={onAddComponent}
|
onClick={onAddComponent}
|
||||||
/>
|
/>
|
||||||
|
@ -73,7 +73,7 @@ const DynamicZoneList = ({ components }) => {
|
|||||||
</CustomFlex>
|
</CustomFlex>
|
||||||
<Box paddingTop={1}>
|
<Box paddingTop={1}>
|
||||||
<Typography fontSize={1} textColor="neutral600" fontWeight="bold">
|
<Typography fontSize={1} textColor="neutral600" fontWeight="bold">
|
||||||
{get(componentLayouts, [componentUid, 'info', 'name'], '')}
|
{get(componentLayouts, [componentUid, 'info', 'displayName'], '')}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
</CustomLink>
|
</CustomLink>
|
||||||
|
@ -45,7 +45,7 @@ const EditSettingsView = ({ mainLayout, components, isContentTypeView, slug, upd
|
|||||||
const [isConfirmDialogOpen, setIsConfirmDialogOpen] = useState(false);
|
const [isConfirmDialogOpen, setIsConfirmDialogOpen] = useState(false);
|
||||||
const { componentLayouts, initialData, modifiedData, metaToEdit, metaForm } = reducerState;
|
const { componentLayouts, initialData, modifiedData, metaToEdit, metaForm } = reducerState;
|
||||||
const { formatMessage } = useIntl();
|
const { formatMessage } = useIntl();
|
||||||
const modelName = get(mainLayout, ['info', isContentTypeView ? 'displayName' : 'name'], '');
|
const modelName = get(mainLayout, ['info', 'displayName'], '');
|
||||||
const attributes = get(modifiedData, ['attributes'], {});
|
const attributes = get(modifiedData, ['attributes'], {});
|
||||||
|
|
||||||
const entryTitleOptions = Object.keys(attributes).filter(attr => {
|
const entryTitleOptions = Object.keys(attributes).filter(attr => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user