mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 07:03:38 +00:00
Init CM migration
Signed-off-by: soupette <cyril.lpz@gmail.com>
This commit is contained in:
parent
76ef9e9503
commit
61c9d8ac4c
@ -3,9 +3,11 @@ import documentationPlugin from '../../../../plugins/documentation/admin/src';
|
||||
import graphqlPlugin from '../../../../plugins/graphql/admin/src';
|
||||
import sentryPlugin from '../../../../plugins/sentry/admin/src';
|
||||
import usersPermissionsPlugin from '../../../../plugins/users-permissions/admin/src';
|
||||
import cmPlugin from '../../../content-manager/admin/src';
|
||||
import emailPlugin from '../../../email/admin/src';
|
||||
|
||||
const plugins = {
|
||||
'@strapi/plugin-content-manager': cmPlugin,
|
||||
'@strapi/plugin-documentation': documentationPlugin,
|
||||
'@strapi/plugin-email': emailPlugin,
|
||||
'@strapi/plugin-graphql': graphqlPlugin,
|
||||
|
||||
@ -174,7 +174,8 @@ function Inputs({
|
||||
]);
|
||||
|
||||
const otherFields = useMemo(() => {
|
||||
return fieldApi.getFields();
|
||||
// return fieldApi.getFields();
|
||||
return {};
|
||||
}, [fieldApi]);
|
||||
|
||||
const { description, visible } = metadatas;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import pluginId from '../../pluginId';
|
||||
|
||||
const selectLayout = state => state.get(`${pluginId}_editViewLayoutManager`).currentLayout;
|
||||
const selectLayout = state => state.[`${pluginId}_editViewLayoutManager`].currentLayout;
|
||||
|
||||
export default selectLayout;
|
||||
|
||||
@ -5,7 +5,7 @@ import { initialState } from './reducer';
|
||||
/**
|
||||
* Direct selector to the listView state domain
|
||||
*/
|
||||
const listViewDomain = () => state => state.get(`${pluginId}_listView`) || initialState;
|
||||
const listViewDomain = () => state => state[`${pluginId}_listView`] || initialState;
|
||||
|
||||
/**
|
||||
* Other specific selectors
|
||||
|
||||
@ -3,7 +3,7 @@ import pluginId from '../../pluginId';
|
||||
import { initialState } from './reducer';
|
||||
|
||||
const selectMainDomain = () => state => {
|
||||
return state.get(`${pluginId}_main`) || initialState;
|
||||
return state[`${pluginId}_main`] || initialState;
|
||||
};
|
||||
|
||||
const makeSelectMain = () =>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
const selectMenuLinks = state => {
|
||||
const menuState = state.get('menu');
|
||||
const menuState = state.menu;
|
||||
|
||||
return menuState.collectionTypesSectionLinks;
|
||||
};
|
||||
|
||||
@ -9,44 +9,80 @@ import pluginPkg from '../../package.json';
|
||||
import pluginId from './pluginId';
|
||||
import pluginLogo from './assets/images/logo.svg';
|
||||
import App from './containers/Main';
|
||||
|
||||
import ConfigureViewButton from './InjectedComponents/ContentTypeBuilder/ConfigureViewButton';
|
||||
import lifecycles from './lifecycles';
|
||||
import reducers from './reducers';
|
||||
import trads from './translations';
|
||||
|
||||
export default strapi => {
|
||||
const pluginDescription = pluginPkg.strapi.description || pluginPkg.description;
|
||||
const plugin = {
|
||||
blockerComponent: null,
|
||||
blockerComponentProps: {},
|
||||
description: pluginDescription,
|
||||
icon: pluginPkg.strapi.icon,
|
||||
id: pluginId,
|
||||
initializer: null,
|
||||
injectedComponents: [
|
||||
{
|
||||
plugin: 'content-type-builder.listView',
|
||||
area: 'list.link',
|
||||
component: ConfigureViewButton,
|
||||
key: 'content-manager.link',
|
||||
},
|
||||
],
|
||||
injectionZones: {
|
||||
editView: { informations: [] },
|
||||
listView: { actions: [], deleteModalAdditionalInfos: [] },
|
||||
},
|
||||
isReady: true,
|
||||
isRequired: pluginPkg.strapi.required || false,
|
||||
layout: null,
|
||||
lifecycles,
|
||||
mainComponent: App,
|
||||
name: pluginPkg.strapi.name,
|
||||
pluginLogo,
|
||||
preventComponentRendering: false,
|
||||
reducers,
|
||||
trads,
|
||||
};
|
||||
const pluginDescription = pluginPkg.strapi.description || pluginPkg.description;
|
||||
const icon = pluginPkg.strapi.icon;
|
||||
const name = pluginPkg.strapi.name;
|
||||
|
||||
return strapi.registerPlugin(plugin);
|
||||
export default {
|
||||
register(app) {
|
||||
app.addReducers(reducers);
|
||||
|
||||
app.registerPlugin({
|
||||
description: pluginDescription,
|
||||
icon,
|
||||
id: pluginId,
|
||||
// TODO
|
||||
injectedComponents: [
|
||||
{
|
||||
plugin: 'content-type-builder.listView',
|
||||
area: 'list.link',
|
||||
component: ConfigureViewButton,
|
||||
key: 'content-manager.link',
|
||||
},
|
||||
],
|
||||
injectionZones: {
|
||||
editView: { informations: [] },
|
||||
listView: { actions: [], deleteModalAdditionalInfos: [] },
|
||||
},
|
||||
isReady: true,
|
||||
isRequired: pluginPkg.strapi.required || false,
|
||||
mainComponent: App,
|
||||
name,
|
||||
pluginLogo,
|
||||
preventComponentRendering: false,
|
||||
// reducers,
|
||||
trads,
|
||||
});
|
||||
},
|
||||
boot() {},
|
||||
};
|
||||
|
||||
// export default strapi => {
|
||||
// const pluginDescription = pluginPkg.strapi.description || pluginPkg.description;
|
||||
// const plugin = {
|
||||
// blockerComponent: null,
|
||||
// blockerComponentProps: {},
|
||||
// description: pluginDescription,
|
||||
// icon: pluginPkg.strapi.icon,
|
||||
// id: pluginId,
|
||||
// initializer: null,
|
||||
// injectedComponents: [
|
||||
// {
|
||||
// plugin: 'content-type-builder.listView',
|
||||
// area: 'list.link',
|
||||
// component: ConfigureViewButton,
|
||||
// key: 'content-manager.link',
|
||||
// },
|
||||
// ],
|
||||
// injectionZones: {
|
||||
// editView: { informations: [] },
|
||||
// listView: { actions: [], deleteModalAdditionalInfos: [] },
|
||||
// },
|
||||
// isReady: true,
|
||||
// isRequired: pluginPkg.strapi.required || false,
|
||||
// layout: null,
|
||||
|
||||
// mainComponent: App,
|
||||
// name: pluginPkg.strapi.name,
|
||||
// pluginLogo,
|
||||
// preventComponentRendering: false,
|
||||
// reducers,
|
||||
// trads,
|
||||
// };
|
||||
|
||||
// return strapi.registerPlugin(plugin);
|
||||
// };
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import pluginId from './pluginId';
|
||||
|
||||
export const selectPermissions = state => state.get(`${pluginId}_rbacManager`).permissions;
|
||||
export const selectPermissions = state => state[`${pluginId}_rbacManager`].permissions;
|
||||
|
||||
export const selectCollectionTypePermissions = state =>
|
||||
state.get('permissionsManager').collectionTypesRelatedPermissions;
|
||||
state.permissionsManager.collectionTypesRelatedPermissions;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import pluginId from '../../pluginId';
|
||||
|
||||
const selectCrudReducer = state => state.get(`${pluginId}_editViewCrudReducer`);
|
||||
const selectCrudReducer = state => state[`${pluginId}_editViewCrudReducer`];
|
||||
|
||||
export default selectCrudReducer;
|
||||
|
||||
@ -8,7 +8,7 @@ const Select = styled.select`
|
||||
padding-left: 1rem;
|
||||
background-position: right -1px center;
|
||||
background-repeat: no-repeat;
|
||||
background-image: url(${Bkg});
|
||||
background-image: url("${Bkg}");
|
||||
border: 1px solid #e3e9f3;
|
||||
border-radius: 0.25rem;
|
||||
line-height: 3.2rem;
|
||||
|
||||
@ -21,7 +21,7 @@ const StyledLink = styled(Link)`
|
||||
}
|
||||
.layout {
|
||||
display: inline-block;
|
||||
background-image: url(${Layout});
|
||||
background-image: url("${Layout}");
|
||||
}
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
@ -31,7 +31,7 @@ const StyledLink = styled(Link)`
|
||||
color: #007eff;
|
||||
}
|
||||
.layout {
|
||||
background-image: url(${LayoutHover});
|
||||
background-image: url("${LayoutHover}");
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@ -18,6 +18,7 @@ const Wrapper = styled.div`
|
||||
display: flex;
|
||||
|
||||
> select {
|
||||
background-image: url("${Bkg}");
|
||||
width: 75px !important;
|
||||
height: 3.2rem !important;
|
||||
padding-top: 0rem;
|
||||
@ -25,7 +26,6 @@ const Wrapper = styled.div`
|
||||
padding-right: 3rem;
|
||||
background-position: right -1px center;
|
||||
background-repeat: no-repeat;
|
||||
background-image: url(${Bkg});
|
||||
border: 1px solid #e3e9f3;
|
||||
border-radius: 0.25rem;
|
||||
line-height: 29px;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user