mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 19:11:13 +00:00
feat(editor): Refactor the executable node logic (no-changelog) (#16848)
This commit is contained in:
@@ -19,7 +19,6 @@ import TriggerPanel from './TriggerPanel.vue';
|
||||
import {
|
||||
APP_MODALS_ELEMENT_ID,
|
||||
BASE_NODE_SURVEY_URL,
|
||||
EnterpriseEditionFeature,
|
||||
EXECUTABLE_TRIGGER_NODE_TYPES,
|
||||
MODAL_CONFIRM,
|
||||
START_NODE_TYPE,
|
||||
@@ -31,7 +30,6 @@ import { dataPinningEventBus, ndvEventBus } from '@/event-bus';
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import { useNDVStore } from '@/stores/ndv.store';
|
||||
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import { useDeviceSupport } from '@n8n/composables/useDeviceSupport';
|
||||
import { useNodeHelpers } from '@/composables/useNodeHelpers';
|
||||
import { useMessage } from '@/composables/useMessage';
|
||||
@@ -76,7 +74,6 @@ const pinnedData = usePinnedData(activeNode);
|
||||
const workflowActivate = useWorkflowActivate();
|
||||
const nodeTypesStore = useNodeTypesStore();
|
||||
const workflowsStore = useWorkflowsStore();
|
||||
const settingsStore = useSettingsStore();
|
||||
const deviceSupport = useDeviceSupport();
|
||||
const telemetry = useTelemetry();
|
||||
const i18n = useI18n();
|
||||
@@ -333,25 +330,9 @@ const blockUi = computed(
|
||||
() => workflowsStore.isWorkflowRunning || isExecutionWaitingForWebhook.value,
|
||||
);
|
||||
|
||||
const foreignCredentials = computed(() => {
|
||||
const credentials = activeNode.value?.credentials;
|
||||
const usedCredentials = workflowsStore.usedCredentials;
|
||||
|
||||
const foreignCredentialsArray: string[] = [];
|
||||
if (credentials && settingsStore.isEnterpriseFeatureEnabled[EnterpriseEditionFeature.Sharing]) {
|
||||
Object.values(credentials).forEach((credential) => {
|
||||
if (
|
||||
credential.id &&
|
||||
usedCredentials[credential.id] &&
|
||||
!usedCredentials[credential.id].currentUserHasAccess
|
||||
) {
|
||||
foreignCredentialsArray.push(credential.id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return foreignCredentialsArray;
|
||||
});
|
||||
const foreignCredentials = computed(() =>
|
||||
nodeHelpers.getForeignCredentialsIfSharingEnabled(activeNode.value?.credentials),
|
||||
);
|
||||
|
||||
const hasForeignCredential = computed(() => foreignCredentials.value.length > 0);
|
||||
|
||||
@@ -850,7 +831,6 @@ onBeforeUnmount(() => {
|
||||
:event-bus="settingsEventBus"
|
||||
:dragging="isDragging"
|
||||
:push-ref="pushRef"
|
||||
:node-type="activeNodeType"
|
||||
:foreign-credentials="foreignCredentials"
|
||||
:read-only="readOnly"
|
||||
:block-u-i="blockUi && showTriggerPanel"
|
||||
|
||||
Reference in New Issue
Block a user