2019-10-10 11:45:26 +02:00
|
|
|
import pluginPkg from '../../package.json';
|
|
|
|
import pluginId from './pluginId';
|
|
|
|
import App from './containers/App';
|
|
|
|
import Initializer from './containers/Initializer';
|
|
|
|
import trads from './translations';
|
|
|
|
|
2021-05-12 11:51:12 +02:00
|
|
|
const pluginDescription = pluginPkg.strapi.description || pluginPkg.description;
|
|
|
|
const icon = pluginPkg.strapi.icon;
|
|
|
|
const name = pluginPkg.strapi.name;
|
2019-10-10 11:45:26 +02:00
|
|
|
|
2021-05-12 11:51:12 +02:00
|
|
|
export default {
|
|
|
|
register(app) {
|
|
|
|
app.registerPlugin({
|
|
|
|
description: pluginDescription,
|
|
|
|
icon,
|
|
|
|
id: pluginId,
|
|
|
|
initializer: Initializer,
|
|
|
|
isReady: false,
|
|
|
|
isRequired: pluginPkg.strapi.required || false,
|
|
|
|
mainComponent: App,
|
|
|
|
name,
|
|
|
|
menu: {
|
|
|
|
pluginsSectionLinks: [
|
|
|
|
{
|
|
|
|
destination: `/plugins/${pluginId}`,
|
|
|
|
icon,
|
|
|
|
label: {
|
|
|
|
id: `${pluginId}.plugin.name`,
|
|
|
|
defaultMessage: name,
|
|
|
|
},
|
|
|
|
name,
|
|
|
|
permissions: [
|
|
|
|
// Uncomment to set the permissions of the plugin here
|
|
|
|
// {
|
|
|
|
// action: '', // the action name should be plugins::plugin-name.actionType
|
|
|
|
// subject: null,
|
|
|
|
// },
|
|
|
|
],
|
2020-06-09 12:05:59 +02:00
|
|
|
},
|
2021-05-12 11:51:12 +02:00
|
|
|
],
|
|
|
|
},
|
|
|
|
trads,
|
|
|
|
});
|
|
|
|
},
|
|
|
|
boot(app) {},
|
2019-10-10 11:45:26 +02:00
|
|
|
};
|