mirror of
https://github.com/strapi/strapi.git
synced 2025-08-29 11:15:55 +00:00
fix: display name of upload plugin in roles settings (#23739)
This commit is contained in:
parent
610f71e631
commit
fe161e34b5
@ -91,6 +91,8 @@ const Row = ({
|
|||||||
const { formatMessage } = useIntl();
|
const { formatMessage } = useIntl();
|
||||||
|
|
||||||
const categoryName = name.split('::').pop() ?? '';
|
const categoryName = name.split('::').pop() ?? '';
|
||||||
|
const categoryDisplayName =
|
||||||
|
categoryName === 'upload' ? 'Media Library' : capitalise(categoryName.replace(/-/g, ' '));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Accordion.Item value={name}>
|
<Accordion.Item value={name}>
|
||||||
@ -102,7 +104,7 @@ const Row = ({
|
|||||||
{ category: categoryName }
|
{ category: categoryName }
|
||||||
)} ${kind === 'plugins' ? 'plugin' : kind}`}
|
)} ${kind === 'plugins' ? 'plugin' : kind}`}
|
||||||
>
|
>
|
||||||
{capitalise(categoryName)}
|
{categoryDisplayName}
|
||||||
</Accordion.Trigger>
|
</Accordion.Trigger>
|
||||||
</Accordion.Header>
|
</Accordion.Header>
|
||||||
<Accordion.Content>
|
<Accordion.Content>
|
||||||
|
@ -15,7 +15,7 @@ function formatPluginName(pluginSlug) {
|
|||||||
case 'plugin::i18n':
|
case 'plugin::i18n':
|
||||||
return 'i18n';
|
return 'i18n';
|
||||||
case 'plugin::upload':
|
case 'plugin::upload':
|
||||||
return 'Upload';
|
return 'Media Library';
|
||||||
case 'plugin::users-permissions':
|
case 'plugin::users-permissions':
|
||||||
return 'Users-permissions';
|
return 'Users-permissions';
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user