mirror of
https://github.com/strapi/strapi.git
synced 2025-12-12 15:32:42 +00:00
update generators
Signed-off-by: soupette <cyril@strapi.io>
This commit is contained in:
parent
58790b682b
commit
ad7fc123c1
@ -14,7 +14,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@strapi/admin": "3.6.8",
|
"@strapi/admin": "3.6.8",
|
||||||
"@strapi/plugin-documentation": "3.6.8",
|
"@strapi/plugin-documentation": "3.6.8",
|
||||||
"@strapi/plugin-sentry": "3.6.8",
|
|
||||||
"@strapi/plugin-graphql": "3.6.8",
|
"@strapi/plugin-graphql": "3.6.8",
|
||||||
"@strapi/plugin-i18n": "3.6.8",
|
"@strapi/plugin-i18n": "3.6.8",
|
||||||
"@strapi/plugin-users-permissions": "3.6.8",
|
"@strapi/plugin-users-permissions": "3.6.8",
|
||||||
|
|||||||
@ -0,0 +1,23 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* PluginIcon
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
import React from 'react';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||||
|
|
||||||
|
const IconWrapper = styled.span`
|
||||||
|
svg.svg-inline--fa.fa-w-20 {
|
||||||
|
width: 1rem;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
const PluginIcon = () => (
|
||||||
|
<IconWrapper>
|
||||||
|
<FontAwesomeIcon icon="plug" />
|
||||||
|
</IconWrapper>
|
||||||
|
);
|
||||||
|
|
||||||
|
export default PluginIcon;
|
||||||
@ -1,15 +1,15 @@
|
|||||||
import { prefixPluginTranslations } from '@strapi/helper-plugin';
|
import { prefixPluginTranslations } from '@strapi/helper-plugin';
|
||||||
|
import PluginIcon from './components/PluginIcon';
|
||||||
import pluginPkg from '../../package.json';
|
import pluginPkg from '../../package.json';
|
||||||
import pluginId from './pluginId';
|
import pluginId from './pluginId';
|
||||||
const pluginDescription = pluginPkg.strapi.description || pluginPkg.description;
|
|
||||||
const icon = pluginPkg.strapi.icon;
|
|
||||||
const name = pluginPkg.strapi.name;
|
const name = pluginPkg.strapi.name;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
register(app) {
|
register(app) {
|
||||||
app.addMenuLink({
|
app.addMenuLink({
|
||||||
to: `/plugins/${pluginId}`,
|
to: `/plugins/${pluginId}`,
|
||||||
icon,
|
icon: PluginIcon,
|
||||||
intlLabel: {
|
intlLabel: {
|
||||||
id: `${pluginId}.plugin.name`,
|
id: `${pluginId}.plugin.name`,
|
||||||
defaultMessage: 'My plugin',
|
defaultMessage: 'My plugin',
|
||||||
@ -22,11 +22,7 @@ export default {
|
|||||||
permissions: [],
|
permissions: [],
|
||||||
});
|
});
|
||||||
app.registerPlugin({
|
app.registerPlugin({
|
||||||
description: pluginDescription,
|
|
||||||
icon,
|
|
||||||
id: pluginId,
|
id: pluginId,
|
||||||
isReady: true,
|
|
||||||
isRequired: pluginPkg.strapi.required || false,
|
|
||||||
name,
|
name,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@ -5,7 +5,6 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"strapi": {
|
"strapi": {
|
||||||
"name": "my-plugin",
|
"name": "my-plugin",
|
||||||
"icon": "plug",
|
|
||||||
"description": "Description of my plugin.",
|
"description": "Description of my plugin.",
|
||||||
"kind": "plugin"
|
"kind": "plugin"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,23 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* PluginIcon
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
import React from 'react';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||||
|
|
||||||
|
const IconWrapper = styled.span`
|
||||||
|
svg.svg-inline--fa.fa-w-20 {
|
||||||
|
width: 1rem;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
const PluginIcon = () => (
|
||||||
|
<IconWrapper>
|
||||||
|
<FontAwesomeIcon icon="plug" />
|
||||||
|
</IconWrapper>
|
||||||
|
);
|
||||||
|
|
||||||
|
export default PluginIcon;
|
||||||
@ -2,16 +2,15 @@ import { prefixPluginTranslations } from '@strapi/helper-plugin';
|
|||||||
import pluginPkg from '../../package.json';
|
import pluginPkg from '../../package.json';
|
||||||
import pluginId from './pluginId';
|
import pluginId from './pluginId';
|
||||||
import Initializer from './components/Initializer';
|
import Initializer from './components/Initializer';
|
||||||
|
import PluginIcon from './components/PluginIcon';
|
||||||
|
|
||||||
const pluginDescription = pluginPkg.strapi.description || pluginPkg.description;
|
|
||||||
const icon = pluginPkg.strapi.icon;
|
|
||||||
const name = pluginPkg.strapi.name;
|
const name = pluginPkg.strapi.name;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
register(app) {
|
register(app) {
|
||||||
app.addMenuLink({
|
app.addMenuLink({
|
||||||
to: `/plugins/${pluginId}`,
|
to: `/plugins/${pluginId}`,
|
||||||
icon,
|
icon: PluginIcon,
|
||||||
intlLabel: {
|
intlLabel: {
|
||||||
id: `${pluginId}.plugin.name`,
|
id: `${pluginId}.plugin.name`,
|
||||||
defaultMessage: name,
|
defaultMessage: name,
|
||||||
@ -30,12 +29,9 @@ export default {
|
|||||||
],
|
],
|
||||||
});
|
});
|
||||||
app.registerPlugin({
|
app.registerPlugin({
|
||||||
description: pluginDescription,
|
|
||||||
icon,
|
|
||||||
id: pluginId,
|
id: pluginId,
|
||||||
initializer: Initializer,
|
initializer: Initializer,
|
||||||
isReady: false,
|
isReady: false,
|
||||||
isRequired: pluginPkg.strapi.required || false,
|
|
||||||
name,
|
name,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@ -4,7 +4,6 @@
|
|||||||
"description": "This is the description of the plugin.",
|
"description": "This is the description of the plugin.",
|
||||||
"strapi": {
|
"strapi": {
|
||||||
"name": "{{ pluginName }}",
|
"name": "{{ pluginName }}",
|
||||||
"icon": "plug",
|
|
||||||
"description": "Description of {{ pluginName }} plugin",
|
"description": "Description of {{ pluginName }} plugin",
|
||||||
"kind": "plugin"
|
"kind": "plugin"
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user