feat: Move admin page to settings
parent
37ef6f6c69
commit
63ac38c926
|
@ -1,8 +1,8 @@
|
|||
import { prefixPluginTranslations } from '@strapi/helper-plugin';
|
||||
import pluginPkg from '../../package.json';
|
||||
import pluginId from './helpers/pluginId';
|
||||
import pluginIcon from './components/PluginIcon';
|
||||
import pluginPermissions from './permissions';
|
||||
// import pluginIcon from './components/PluginIcon';
|
||||
// import getTrad from './helpers/getTrad';
|
||||
|
||||
const pluginDescription = pluginPkg.strapi.description || pluginPkg.description;
|
||||
|
@ -18,22 +18,33 @@ export default {
|
|||
name,
|
||||
});
|
||||
|
||||
app.addMenuLink({
|
||||
to: `/plugins/${pluginId}`,
|
||||
icon: pluginIcon,
|
||||
intlLabel: {
|
||||
id: `${pluginId}.plugin.name`,
|
||||
defaultMessage: 'Config Sync',
|
||||
app.createSettingSection(
|
||||
{
|
||||
id: pluginId,
|
||||
intlLabel: {
|
||||
id: `${pluginId}.plugin.name`,
|
||||
defaultMessage: 'Config Sync',
|
||||
},
|
||||
},
|
||||
Component: async () => {
|
||||
const component = await import(
|
||||
/* webpackChunkName: "config-sync-settings-page" */ './containers/App'
|
||||
);
|
||||
[
|
||||
{
|
||||
intlLabel: {
|
||||
id: `${pluginId}.Settings.Tool.Title`,
|
||||
defaultMessage: 'Tools',
|
||||
},
|
||||
id: 'config-sync-page',
|
||||
to: `/settings/${pluginId}`,
|
||||
Component: async () => {
|
||||
const component = await import(
|
||||
/* webpackChunkName: "config-sync-settings-page" */ './containers/App'
|
||||
);
|
||||
|
||||
return component;
|
||||
},
|
||||
permissions: pluginPermissions['menu-link'],
|
||||
});
|
||||
return component;
|
||||
},
|
||||
permissions: pluginPermissions['settings'],
|
||||
},
|
||||
],
|
||||
);
|
||||
},
|
||||
bootstrap(app) {},
|
||||
async registerTrads({ locales }) {
|
||||
|
|
|
@ -10,5 +10,7 @@
|
|||
"Header.Title": "Config Sync",
|
||||
"Header.Description": "Manage your database config across environments.",
|
||||
|
||||
"Settings.Tool.Title": "Tool",
|
||||
|
||||
"plugin.name": "Config Sync"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue