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