mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 19:32:15 +00:00
fix(editor): Add back prompt requesting to save unsaved changes (no-changelog) (#10190)
This commit is contained in:
@@ -87,8 +87,7 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { deepCopy, NodeConnectionType, NodeHelpers, TelemetryHelpers } from 'n8n-workflow';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import type { Ref } from 'vue';
|
||||
import { computed, nextTick } from 'vue';
|
||||
import { computed, nextTick, ref } from 'vue';
|
||||
import type { useRouter } from 'vue-router';
|
||||
import { useClipboard } from '@/composables/useClipboard';
|
||||
import { isPresent } from '../utils/typesUtils';
|
||||
@@ -108,13 +107,7 @@ type AddNodeOptions = {
|
||||
isAutoAdd?: boolean;
|
||||
};
|
||||
|
||||
export function useCanvasOperations({
|
||||
router,
|
||||
lastClickPosition,
|
||||
}: {
|
||||
router: ReturnType<typeof useRouter>;
|
||||
lastClickPosition: Ref<XYPosition>;
|
||||
}) {
|
||||
export function useCanvasOperations({ router }: { router: ReturnType<typeof useRouter> }) {
|
||||
const rootStore = useRootStore();
|
||||
const workflowsStore = useWorkflowsStore();
|
||||
const credentialsStore = useCredentialsStore();
|
||||
@@ -136,6 +129,8 @@ export function useCanvasOperations({
|
||||
const externalHooks = useExternalHooks();
|
||||
const clipboard = useClipboard();
|
||||
|
||||
const lastClickPosition = ref<XYPosition>([0, 0]);
|
||||
|
||||
const preventOpeningNDV = !!localStorage.getItem('NodeView.preventOpeningNDV');
|
||||
|
||||
const editableWorkflow = computed(() => workflowsStore.workflow);
|
||||
@@ -1698,6 +1693,7 @@ export function useCanvasOperations({
|
||||
}
|
||||
|
||||
return {
|
||||
lastClickPosition,
|
||||
editableWorkflow,
|
||||
editableWorkflowObject,
|
||||
triggerNodes,
|
||||
|
||||
Reference in New Issue
Block a user