2019-04-16 16:55:53 +02:00
|
|
|
import pluginPkg from '../../package.json';
|
2020-01-08 12:21:47 +01:00
|
|
|
import layout from '../../config/layout';
|
2019-04-16 16:55:53 +02:00
|
|
|
import pluginId from './pluginId';
|
|
|
|
import App from './containers/App';
|
2019-04-18 00:32:21 +02:00
|
|
|
import Initializer from './containers/Initializer';
|
|
|
|
import lifecycles from './lifecycles';
|
|
|
|
import trads from './translations';
|
2019-04-16 16:55:53 +02:00
|
|
|
|
2020-01-23 16:46:50 +01:00
|
|
|
export default strapi => {
|
|
|
|
const pluginDescription =
|
|
|
|
pluginPkg.strapi.description || pluginPkg.description;
|
2020-01-30 11:50:34 +01:00
|
|
|
const settings = {};
|
|
|
|
// const settings = {
|
|
|
|
// menuSection: {
|
|
|
|
// id: pluginId,
|
|
|
|
// title: {
|
|
|
|
// id: 'Permissions',
|
|
|
|
// },
|
|
|
|
// links: [
|
|
|
|
// {
|
|
|
|
// title: 'coucou2',
|
|
|
|
// to: '/settings/webhooks',
|
|
|
|
// name: 'coucou2',
|
|
|
|
// links: [
|
|
|
|
// {
|
|
|
|
// title: {
|
|
|
|
// id: 'coucou',
|
|
|
|
// },
|
|
|
|
// to: '/settings/webhooks',
|
|
|
|
// name: 'webhooks',
|
|
|
|
// },
|
|
|
|
// ],
|
|
|
|
// },
|
|
|
|
// ],
|
|
|
|
// },
|
|
|
|
// };
|
2019-04-16 16:55:53 +02:00
|
|
|
|
2020-01-23 16:46:50 +01:00
|
|
|
const plugin = {
|
|
|
|
blockerComponent: null,
|
|
|
|
blockerComponentProps: {},
|
|
|
|
description: pluginDescription,
|
|
|
|
icon: pluginPkg.strapi.icon,
|
|
|
|
id: pluginId,
|
|
|
|
initializer: Initializer,
|
|
|
|
injectedComponents: [],
|
|
|
|
layout,
|
|
|
|
lifecycles,
|
|
|
|
leftMenuLinks: [],
|
|
|
|
leftMenuSections: [],
|
|
|
|
mainComponent: App,
|
|
|
|
name: pluginPkg.strapi.name,
|
|
|
|
preventComponentRendering: false,
|
2020-01-30 11:50:34 +01:00
|
|
|
settings,
|
2020-01-23 16:46:50 +01:00
|
|
|
suffixUrl: () => '/roles',
|
|
|
|
suffixUrlToReplaceForLeftMenuHighlight: '/roles',
|
|
|
|
trads,
|
|
|
|
};
|
2019-04-16 16:55:53 +02:00
|
|
|
|
2020-01-23 16:46:50 +01:00
|
|
|
return strapi.registerPlugin(plugin);
|
2019-04-16 16:55:53 +02:00
|
|
|
};
|