feat(editor): Add duplicate and copy/paste to canvas v2 (no-changelog) (#10112)

This commit is contained in:
Elias Meire
2024-07-19 14:49:52 +02:00
committed by GitHub
parent fc4184773a
commit 2e5c548452
9 changed files with 400 additions and 42 deletions

View File

@@ -241,6 +241,7 @@ import {
DRAG_EVENT_DATA_KEY,
UPDATE_WEBHOOK_ID_NODE_TYPES,
CANVAS_AUTO_ADD_MANUAL_TRIGGER_EXPERIMENT,
VALID_WORKFLOW_IMPORT_URL_REGEX,
} from '@/constants';
import useGlobalLinkActions from '@/composables/useGlobalLinkActions';
@@ -2024,7 +2025,7 @@ export default defineComponent({
return;
}
// Check if it is an URL which could contain workflow data
if (plainTextData.match(/^http[s]?:\/\/.*\.json$/i)) {
if (plainTextData.match(VALID_WORKFLOW_IMPORT_URL_REGEX)) {
// Pasted data points to a possible workflow JSON file
if (!this.editAllowedCheck()) {