diff --git a/packages/editor-ui/src/init.ts b/packages/editor-ui/src/init.ts index ed76b904bc..1e6ca97b65 100644 --- a/packages/editor-ui/src/init.ts +++ b/packages/editor-ui/src/init.ts @@ -24,15 +24,17 @@ export async function initializeCore() { const versionsStore = useVersionsStore(); await settingsStore.initialize(); - await usersStore.initialize(); + if (!settingsStore.isPreviewMode) { + await usersStore.initialize(); - void versionsStore.checkForNewVersions(); + void versionsStore.checkForNewVersions(); - if (settingsStore.isCloudDeployment) { - try { - await initializeCloudHooks(); - } catch (e) { - console.error('Failed to initialize cloud hooks:', e); + if (settingsStore.isCloudDeployment) { + try { + await initializeCloudHooks(); + } catch (e) { + console.error('Failed to initialize cloud hooks:', e); + } } } diff --git a/packages/editor-ui/src/views/NodeView.vue b/packages/editor-ui/src/views/NodeView.vue index 940ba3bab2..9ea6de100f 100644 --- a/packages/editor-ui/src/views/NodeView.vue +++ b/packages/editor-ui/src/views/NodeView.vue @@ -809,16 +809,22 @@ export default defineComponent({ this.clipboard.onPaste.value = this.onClipboardPasteEvent; this.canvasStore.startLoading(); - const loadPromises = - this.settingsStore.isPreviewMode && this.isDemo - ? [] - : [ - this.loadActiveWorkflows(), - this.loadCredentials(), - this.loadCredentialTypes(), - this.loadVariables(), - this.loadSecrets(), - ]; + + const loadPromises = (() => { + if (this.settingsStore.isPreviewMode && this.isDemo) return []; + const promises = [ + this.loadActiveWorkflows(), + this.loadCredentials(), + this.loadCredentialTypes(), + ]; + if (this.settingsStore.isEnterpriseFeatureEnabled(EnterpriseEditionFeature.Variables)) { + promises.push(this.loadVariables()); + } + if (this.settingsStore.isEnterpriseFeatureEnabled(EnterpriseEditionFeature.ExternalSecrets)) { + promises.push(this.loadSecrets()); + } + return promises; + })(); if (this.nodeTypesStore.allNodeTypes.length === 0) { loadPromises.push(this.loadNodeTypes()); diff --git a/packages/editor-ui/src/views/SettingsExternalSecrets.vue b/packages/editor-ui/src/views/SettingsExternalSecrets.vue index 886d70250c..a8fe89fb6c 100644 --- a/packages/editor-ui/src/views/SettingsExternalSecrets.vue +++ b/packages/editor-ui/src/views/SettingsExternalSecrets.vue @@ -19,6 +19,7 @@ const sortedProviders = computed(() => { }); onMounted(() => { + if (!externalSecretsStore.isEnterpriseExternalSecretsEnabled) return; try { void externalSecretsStore.fetchAllSecrets(); void externalSecretsStore.getProviders(); diff --git a/packages/editor-ui/src/views/SettingsSourceControl.vue b/packages/editor-ui/src/views/SettingsSourceControl.vue index 176c118c01..89d0156407 100644 --- a/packages/editor-ui/src/views/SettingsSourceControl.vue +++ b/packages/editor-ui/src/views/SettingsSourceControl.vue @@ -112,6 +112,7 @@ const initialize = async () => { }; onMounted(async () => { + if (!sourceControlStore.isEnterpriseSourceControlEnabled) return; await initialize(); }); diff --git a/packages/editor-ui/src/views/VariablesView.vue b/packages/editor-ui/src/views/VariablesView.vue index 6364361f8a..478ce29c96 100644 --- a/packages/editor-ui/src/views/VariablesView.vue +++ b/packages/editor-ui/src/views/VariablesView.vue @@ -116,6 +116,7 @@ function resetNewVariablesList() { } async function initialize() { + if (!isFeatureEnabled.value) return; await environmentsStore.fetchAllVariables(); allVariables.value = [...environmentsStore.variables];