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

@@ -121,7 +121,6 @@
import { defineComponent } from 'vue';
import { mapStores } from 'pinia';
import VueJsonPretty from 'vue-json-pretty';
import { copyPaste } from '@/mixins/copyPaste';
import { useToast } from '@/composables/useToast';
import { MAX_DISPLAY_DATA_SIZE } from '@/constants';
@@ -134,16 +133,19 @@ import type {
import { sanitizeHtml } from '@/utils/htmlUtils';
import { useNDVStore } from '@/stores/ndv.store';
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
import { useClipboard } from '@/composables/useClipboard';
export default defineComponent({
name: 'NodeErrorView',
components: {
VueJsonPretty,
},
mixins: [copyPaste],
props: ['error'],
setup() {
const clipboard = useClipboard();
return {
clipboard,
...useToast(),
};
},
@@ -283,7 +285,7 @@ export default defineComponent({
return [currentParameter];
},
copyCause() {
this.copyToClipboard(JSON.stringify(this.error.cause));
void this.clipboard.copy(JSON.stringify(this.error.cause));
this.copySuccess();
},
copySuccess() {