1
1
mirror of https://github.com/n8n-io/n8n.git synced 2024-10-06 09:37:36 +03:00

feat: Update workflow overwriting message (#4917)

* feat: Update workflow overwriting message

* fix: remove unused import
This commit is contained in:
Alex Grozav 2022-12-14 15:50:31 +02:00 committed by GitHub
parent fbcbef20e7
commit 2964458191
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 9 deletions

View File

@ -46,7 +46,7 @@ import {
ITag,
IUpdateInformation,
TargetItem,
} from '../../Interface';
} from '../Interface';
import { externalHooks } from '@/mixins/externalHooks';
import { restApi } from '@/mixins/restApi';
@ -66,9 +66,9 @@ import { IWorkflowSettings } from 'n8n-workflow';
import { useNDVStore } from '@/stores/ndv';
import { useTemplatesStore } from '@/stores/templates';
import { useNodeTypesStore } from '@/stores/nodeTypes';
import useWorkflowsEEStore from '@/stores/workflows.ee';
import { useUsersStore } from '@/stores/users';
import { ICredentialMap, ICredentialsResponse, IUsedCredential } from '@/Interface';
import { useWorkflowsEEStore } from "@/stores/workflows.ee";
import { useUsersStore } from "@/stores/users";
import { ICredentialsResponse } from '@/Interface';
let cachedWorkflowKey: string | null = '';
let cachedWorkflow: Workflow | null = null;
@ -481,7 +481,6 @@ export const workflowHelpers = mixins(externalHooks, nodeHelpers, restApi, showM
if (nodeType !== null) {
// Node-Type is known so we can save the parameters correctly
const nodeParameters = NodeHelpers.getNodeParameters(
nodeType.properties,
node.parameters,
@ -828,8 +827,14 @@ export const workflowHelpers = mixins(externalHooks, nodeHelpers, restApi, showM
this.uiStore.removeActiveAction('workflowSaving');
if (error.errorCode === 100) {
const url = this.$router.resolve({ name: VIEWS.WORKFLOW, params: { name: currentWorkflow }}).href;
const overwrite = await this.confirmMessage(
this.$locale.baseText('workflows.concurrentChanges.confirmMessage.message'),
this.$locale.baseText('workflows.concurrentChanges.confirmMessage.message', {
interpolate: {
url,
},
}),
this.$locale.baseText('workflows.concurrentChanges.confirmMessage.title'),
null,
this.$locale.baseText('workflows.concurrentChanges.confirmMessage.confirmButtonText'),

View File

@ -1422,10 +1422,10 @@
"workflows.shareModal.info.sharee": "Only {workflowOwnerName} can change who this workflow is shared with",
"workflows.shareModal.info.sharee.fallback": "the owner",
"workflows.roles.editor": "Editor",
"workflows.concurrentChanges.confirmMessage.title": "Workflow was edited by someone else",
"workflows.concurrentChanges.confirmMessage.message": "Another user made <strong>an edit</strong> to this workflow since you last saved it. Do you want to overwrite their changes?",
"workflows.concurrentChanges.confirmMessage.title": "Workflow was changed by someone else",
"workflows.concurrentChanges.confirmMessage.message": "Someone saved this workflow while you were editing it. You can <a href=\"{url}\" target=\"_blank\">view their version</a> (in new tab).<br/><br/>Overwrite their changes with yours?",
"workflows.concurrentChanges.confirmMessage.cancelButtonText": "Cancel",
"workflows.concurrentChanges.confirmMessage.confirmButtonText": "Overwrite then save",
"workflows.concurrentChanges.confirmMessage.confirmButtonText": "Overwrite and Save",
"importCurlModal.title": "Import cURL command",
"importCurlModal.input.label": "cURL Command",
"importCurlModal.input.placeholder": "Paste the cURL command here",