mirror of
https://github.com/strapi/strapi.git
synced 2025-08-30 19:56:05 +00:00
feat: add content preview (remove future flag)
This commit is contained in:
parent
2dcec09530
commit
81b62a508e
@ -1,5 +1 @@
|
||||
module.exports = ({ env }) => ({
|
||||
future: {
|
||||
preview: env.bool('STRAPI_FUTURE_PREVIEW', false),
|
||||
},
|
||||
});
|
||||
module.exports = ({ env }) => ({});
|
||||
|
@ -1 +0,0 @@
|
||||
export const FEATURE_ID = 'preview';
|
@ -1,18 +1,12 @@
|
||||
/* eslint-disable check-file/no-index */
|
||||
|
||||
import { PreviewSidePanel } from './components/PreviewSidePanel';
|
||||
import { FEATURE_ID } from './constants';
|
||||
|
||||
import type { ContentManagerPlugin } from '../content-manager';
|
||||
import type { PluginDefinition } from '@strapi/admin/strapi-admin';
|
||||
|
||||
const previewAdmin = {
|
||||
bootstrap(app) {
|
||||
// TODO: Add license registry check when it's available
|
||||
if (!window.strapi.future.isEnabled(FEATURE_ID)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const contentManagerPluginApis = app.getPlugin('content-manager')
|
||||
.apis as ContentManagerPlugin['config']['apis'];
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
export const FEATURE_ID = 'preview';
|
@ -1,6 +1,5 @@
|
||||
import type { Plugin } from '@strapi/types';
|
||||
|
||||
import { FEATURE_ID } from './constants';
|
||||
import { routes } from './routes';
|
||||
import { controllers } from './controllers';
|
||||
import { services } from './services';
|
||||
@ -11,15 +10,6 @@ import { getService } from './utils';
|
||||
* so that we can assume it is enabled in the other files.
|
||||
*/
|
||||
const getFeature = (): Partial<Plugin.LoadedPlugin> => {
|
||||
if (!strapi.features.future.isEnabled(FEATURE_ID)) {
|
||||
return {};
|
||||
}
|
||||
|
||||
// TODO: Add license registry check when it's available
|
||||
// if (!strapi.ee.features.isEnabled('cms-content-preview')) {
|
||||
// return {};
|
||||
// }
|
||||
|
||||
return {
|
||||
register() {
|
||||
const config = getService(strapi, 'preview-config');
|
||||
|
@ -1,7 +1,5 @@
|
||||
export interface FeaturesConfig {
|
||||
future?: {
|
||||
preview?: boolean;
|
||||
};
|
||||
future?: object;
|
||||
}
|
||||
|
||||
export interface FeaturesService {
|
||||
|
Loading…
x
Reference in New Issue
Block a user