feat(editor): Migrate copyPaste mixin to composables (no-changelog) (#8179)

This commit is contained in:
Alex Grozav
2023-12-29 12:13:24 +02:00
committed by GitHub
parent 216ec079c9
commit f5a4bfe40c
27 changed files with 212 additions and 332 deletions

View File

@@ -66,18 +66,21 @@ import { defineComponent } from 'vue';
import { useToast } from '@/composables/useToast';
import { FORM_TRIGGER_NODE_TYPE, OPEN_URL_PANEL_TRIGGER_NODE_TYPES } from '@/constants';
import { copyPaste } from '@/mixins/copyPaste';
import { workflowHelpers } from '@/mixins/workflowHelpers';
import { useClipboard } from '@/composables/useClipboard';
export default defineComponent({
name: 'NodeWebhooks',
mixins: [copyPaste, workflowHelpers],
mixins: [workflowHelpers],
props: [
'node', // NodeUi
'nodeType', // INodeTypeDescription
],
setup() {
const clipboard = useClipboard();
return {
clipboard,
...useToast(),
};
},
@@ -136,7 +139,7 @@ export default defineComponent({
methods: {
copyWebhookUrl(webhookData: IWebhookDescription): void {
const webhookUrl = this.getWebhookUrlDisplay(webhookData);
this.copyToClipboard(webhookUrl);
void this.clipboard.copy(webhookUrl);
this.showMessage({
title: this.baseText.copyTitle,