diff --git a/packages/editor-ui/src/Interface.ts b/packages/editor-ui/src/Interface.ts index a90751faa5416..86eb5546bb088 100644 --- a/packages/editor-ui/src/Interface.ts +++ b/packages/editor-ui/src/Interface.ts @@ -955,6 +955,7 @@ export interface IUiState { canDrop: boolean; stickyPosition: null | XYPosition; }; + fakeDoorFeatures: IFakeDoor[]; } export type ILogLevel = 'info' | 'debug' | 'warn' | 'error' | 'verbose'; @@ -966,6 +967,7 @@ export type IFakeDoor = { infoText?: string, actionBoxTitle: string, actionBoxDescription: string, + actionBoxButtonLabel?: string, linkURL: string, uiLocations: IFakeDoorLocation[], }; diff --git a/packages/editor-ui/src/components/FeatureComingSoon.vue b/packages/editor-ui/src/components/FeatureComingSoon.vue index 73f6c293e1790..618d7fc3c3319 100644 --- a/packages/editor-ui/src/components/FeatureComingSoon.vue +++ b/packages/editor-ui/src/components/FeatureComingSoon.vue @@ -1,28 +1,33 @@ diff --git a/packages/editor-ui/src/modules/ui.ts b/packages/editor-ui/src/modules/ui.ts index 8f9bfb974efb4..c714cfb63df44 100644 --- a/packages/editor-ui/src/modules/ui.ts +++ b/packages/editor-ui/src/modules/ui.ts @@ -132,6 +132,36 @@ const module: Module = { canDrop: false, stickyPosition: null, }, + fakeDoorFeatures: [ + { + id: FAKE_DOOR_FEATURES.ENVIRONMENTS, + featureName: 'fakeDoor.settings.environments.name', + icon: 'server', + infoText: 'fakeDoor.settings.environments.infoText', + actionBoxTitle: `fakeDoor.settings.environments.actionBox.title`, + actionBoxDescription: 'fakeDoor.settings.environments.actionBox.description', + linkURL: `https://n8n-community.typeform.com/to/l7QOrERN#f=environments`, + uiLocations: ['settings'], + }, + { + id: FAKE_DOOR_FEATURES.LOGGING, + featureName: 'fakeDoor.settings.logging.name', + icon: 'sign-in-alt', + infoText: 'fakeDoor.settings.logging.infoText', + actionBoxTitle: `fakeDoor.settings.logging.actionBox.title`, + actionBoxDescription: 'fakeDoor.settings.logging.actionBox.description', + linkURL: `https://n8n-community.typeform.com/to/l7QOrERN#f=logging`, + uiLocations: ['settings'], + }, + { + id: FAKE_DOOR_FEATURES.SHARING, + featureName: 'fakeDoor.credentialEdit.sharing.name', + actionBoxTitle: 'fakeDoor.credentialEdit.sharing.actionBox.title', + actionBoxDescription: 'fakeDoor.credentialEdit.sharing.actionBox.description', + linkURL: 'https://n8n-community.typeform.com/to/l7QOrERN#f=sharing', + uiLocations: ['credentialsModal'], + }, + ], }, getters: { areExpressionsDisabled(state: IUiState) { @@ -161,40 +191,8 @@ const module: Module = { outputPanelDisplayMode: (state: IUiState) => state.ndv.output.displayMode, outputPanelEditMode: (state: IUiState): IUiState['ndv']['output']['editMode'] => state.ndv.output.editMode, mainPanelPosition: (state: IUiState) => state.mainPanelPosition, - getFakeDoorFeatures: (state: IUiState, getters, rootState, rootGetters): IFakeDoor[] => { - const isCloudDeployment = rootGetters['settings/isCloudDeployment']; - const cloudQueryParams = isCloudDeployment ? '&edition=cloud' : ''; - - return [ - { - id: FAKE_DOOR_FEATURES.ENVIRONMENTS, - featureName: 'fakeDoor.settings.environments.name', - icon: 'server', - infoText: 'fakeDoor.settings.environments.infoText', - actionBoxTitle: `fakeDoor.settings.environments.actionBox.title${isCloudDeployment ? '.cloud' : ''}`, - actionBoxDescription: 'fakeDoor.settings.environments.actionBox.description', - linkURL: `https://n8n-community.typeform.com/to/l7QOrERN#f=environments${cloudQueryParams}`, - uiLocations: ['settings'], - }, - { - id: FAKE_DOOR_FEATURES.LOGGING, - featureName: 'fakeDoor.settings.logging.name', - icon: 'sign-in-alt', - infoText: isCloudDeployment ? '' : 'fakeDoor.settings.logging.infoText', - actionBoxTitle: `fakeDoor.settings.logging.actionBox.title${isCloudDeployment ? '.cloud' : ''}`, - actionBoxDescription: 'fakeDoor.settings.logging.actionBox.description', - linkURL: `https://n8n-community.typeform.com/to/l7QOrERN#f=logging${cloudQueryParams}`, - uiLocations: ['settings'], - }, - { - id: FAKE_DOOR_FEATURES.SHARING, - featureName: 'fakeDoor.credentialEdit.sharing.name', - actionBoxTitle: 'fakeDoor.credentialEdit.sharing.actionBox.title', - actionBoxDescription: 'fakeDoor.credentialEdit.sharing.actionBox.description', - linkURL: 'https://n8n-community.typeform.com/to/l7QOrERN#f=sharing', - uiLocations: ['credentialsModal'], - }, - ]; + getFakeDoorFeatures: (state: IUiState): IFakeDoor[] => { + return state.fakeDoorFeatures; }, getFakeDoorByLocation: (state: IUiState, getters) => (location: IFakeDoorLocation) => { return getters.getFakeDoorFeatures.filter((fakeDoor: IFakeDoor) => fakeDoor.uiLocations.includes(location)); @@ -215,6 +213,9 @@ const module: Module = { const { name, mode } = params; Vue.set(state.modals[name], 'mode', mode); }, + setFakeDoorFeatures: (state: IUiState, payload: IFakeDoor[]) => { + state.fakeDoorFeatures = payload; + }, setActiveId: (state: IUiState, params: {name: string, id: string}) => { const { name, id } = params; Vue.set(state.modals[name], 'activeId', id); diff --git a/packages/editor-ui/src/plugins/i18n/locales/en.json b/packages/editor-ui/src/plugins/i18n/locales/en.json index 5d29ab233cddc..5fb3b71b805d8 100644 --- a/packages/editor-ui/src/plugins/i18n/locales/en.json +++ b/packages/editor-ui/src/plugins/i18n/locales/en.json @@ -300,6 +300,9 @@ "fakeDoor.credentialEdit.sharing.name": "Sharing", "fakeDoor.credentialEdit.sharing.actionBox.title": "Sharing is only available on n8n Cloud right now", "fakeDoor.credentialEdit.sharing.actionBox.description": "If you'd like to be the first to hear when it's ready, join the list", + "fakeDoor.credentialEdit.sharing.actionBox.title.cloud.upgrade": "Upgrade to add users", + "fakeDoor.credentialEdit.sharing.actionBox.description.cloud.upgrade": "Power and Pro plan users can create multiple user accounts and share credentials. (Sharing workflows is coming soon)", + "fakeDoor.credentialEdit.sharing.actionBox.button.cloud.upgrade": "Upgrade", "fakeDoor.settings.environments.name": "Environments", "fakeDoor.settings.environments.infoText": "Environments allow you to use different settings and credentials in a workflow when you're building it vs when it's running in production", "fakeDoor.settings.environments.actionBox.title": "We’re working on adding it to this edition of n8n (as a paid feature). If you’d like to be the first to hear when it’s ready, join the list.", @@ -310,6 +313,10 @@ "fakeDoor.settings.logging.actionBox.title": "We're working on advanced logging (as a paid feature)", "fakeDoor.settings.logging.actionBox.title.cloud": "We're working on advanced logging", "fakeDoor.settings.logging.actionBox.description": "This also includes audit logging. If you'd like to be the first to hear when it's ready, join the list.", + "fakeDoor.settings.users.name": "Users", + "fakeDoor.settings.users.actionBox.title": "Upgrade to add users", + "fakeDoor.settings.users.actionBox.description": "Power and Pro plan users can create multiple user accounts and share credentials. (Sharing workflows is coming soon)", + "fakeDoor.settings.users.actionBox.button": "Upgrade", "fakeDoor.actionBox.button.label": "Join the list", "fixedCollectionParameter.choose": "Choose...", "fixedCollectionParameter.currentlyNoItemsExist": "Currently no items exist", diff --git a/packages/editor-ui/src/views/SettingsFakeDoorView.vue b/packages/editor-ui/src/views/SettingsFakeDoorView.vue index 876158cfed872..4b91cc8d12804 100644 --- a/packages/editor-ui/src/views/SettingsFakeDoorView.vue +++ b/packages/editor-ui/src/views/SettingsFakeDoorView.vue @@ -5,7 +5,7 @@ {{ $locale.baseText(`fakeDoor.settings.${featureId}.name`) }} - +