mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 20:54:07 -08:00
🔀 Merge branch 'master' of github.com:n8n-io/n8n
This commit is contained in:
commit
f44db17654
|
@ -86,11 +86,9 @@ export default mixins(externalHooks, nodeHelpers, workflowHelpers).extend({
|
|||
return this.$store.getters.activeNode;
|
||||
},
|
||||
nodeType (): INodeTypeDescription | null {
|
||||
const activeNode = this.node;
|
||||
if (this.node) {
|
||||
return this.$store.getters.nodeType(this.node.type);
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
},
|
||||
|
@ -111,6 +109,7 @@ export default mixins(externalHooks, nodeHelpers, workflowHelpers).extend({
|
|||
close (e: MouseEvent) {
|
||||
// @ts-ignore
|
||||
if (e.target.className && e.target.className.includes && e.target.className.includes('close-on-click')) {
|
||||
this.$externalHooks().run('dataDisplay.nodeEditingFinished');
|
||||
this.showDocumentHelp = false;
|
||||
this.$store.commit('setActiveNode', null);
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
<script lang="ts">
|
||||
|
||||
import Vue from 'vue';
|
||||
import { externalHooks } from '@/components/mixins/externalHooks';
|
||||
import { nodeBase } from '@/components/mixins/nodeBase';
|
||||
import { nodeHelpers } from '@/components/mixins/nodeHelpers';
|
||||
import { workflowHelpers } from '@/components/mixins/workflowHelpers';
|
||||
|
@ -59,7 +60,7 @@ import NodeIcon from '@/components/NodeIcon.vue';
|
|||
|
||||
import mixins from 'vue-typed-mixins';
|
||||
|
||||
export default mixins(nodeBase, nodeHelpers, workflowHelpers).extend({
|
||||
export default mixins(externalHooks, nodeBase, nodeHelpers, workflowHelpers).extend({
|
||||
name: 'Node',
|
||||
components: {
|
||||
NodeIcon,
|
||||
|
@ -152,6 +153,7 @@ export default mixins(nodeBase, nodeHelpers, workflowHelpers).extend({
|
|||
this.$emit('runWorkflow', this.data.name, 'Node.executeNode');
|
||||
},
|
||||
deleteNode () {
|
||||
this.$externalHooks().run('node.deleteNode', { node: this.data});
|
||||
Vue.nextTick(() => {
|
||||
// Wait a tick else vue causes problems because the data is gone
|
||||
this.$emit('removeNode', this.data.name);
|
||||
|
|
|
@ -453,6 +453,7 @@ export default mixins(
|
|||
|
||||
this.callDebounced('deleteSelectedNodes', 500);
|
||||
} else if (e.key === 'Escape') {
|
||||
this.$externalHooks().run('dataDisplay.nodeEditingFinished');
|
||||
this.createNodeActive = false;
|
||||
this.$store.commit('setActiveNode', null);
|
||||
} else if (e.key === 'Tab') {
|
||||
|
|
Loading…
Reference in a new issue