mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
⚡ Added toast tweaks (#2530)
* Added toast fallback
* Added a parameter to copy function to deduce cut operations
* 👕 Fix Liniting
This commit is contained in:
parent
6453996de3
commit
1d05185c4a
|
@ -840,15 +840,22 @@ export default mixins(
|
||||||
},
|
},
|
||||||
|
|
||||||
cutSelectedNodes () {
|
cutSelectedNodes () {
|
||||||
this.copySelectedNodes();
|
this.copySelectedNodes(true);
|
||||||
this.deleteSelectedNodes();
|
this.deleteSelectedNodes();
|
||||||
},
|
},
|
||||||
|
|
||||||
copySelectedNodes () {
|
copySelectedNodes (isCut: boolean) {
|
||||||
this.getSelectedNodesToSave().then((data) => {
|
this.getSelectedNodesToSave().then((data) => {
|
||||||
const nodeData = JSON.stringify(data, null, 2);
|
const nodeData = JSON.stringify(data, null, 2);
|
||||||
this.copyToClipboard(nodeData);
|
this.copyToClipboard(nodeData);
|
||||||
if (data.nodes.length > 0) {
|
if (data.nodes.length > 0) {
|
||||||
|
if(!isCut){
|
||||||
|
this.$showMessage({
|
||||||
|
title: 'Copied!',
|
||||||
|
message: '',
|
||||||
|
type: 'success',
|
||||||
|
});
|
||||||
|
}
|
||||||
this.$telemetry.track('User copied nodes', {
|
this.$telemetry.track('User copied nodes', {
|
||||||
node_types: data.nodes.map((node) => node.type),
|
node_types: data.nodes.map((node) => node.type),
|
||||||
workflow_id: this.$store.getters.workflowId,
|
workflow_id: this.$store.getters.workflowId,
|
||||||
|
@ -963,12 +970,6 @@ export default mixins(
|
||||||
this.$showError(error, 'Problem deleting the test-webhook', 'There was a problem deleting webhook:');
|
this.$showError(error, 'Problem deleting the test-webhook', 'There was a problem deleting webhook:');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$showMessage({
|
|
||||||
title: 'Webhook deleted',
|
|
||||||
message: `The webhook was deleted successfully`,
|
|
||||||
type: 'success',
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue