diff --git a/packages/editor-ui/src/Interface.ts b/packages/editor-ui/src/Interface.ts index c90e18da3a..3cd3761bee 100644 --- a/packages/editor-ui/src/Interface.ts +++ b/packages/editor-ui/src/Interface.ts @@ -1438,7 +1438,8 @@ export type VersionControlPreferences = { repositoryUrl: string; authorName: string; authorEmail: string; - branchName: string; + currentBranch: string; + branches: string[]; branchReadOnly: boolean; branchColor: string; publicKey?: string; diff --git a/packages/editor-ui/src/plugins/i18n/locales/en.json b/packages/editor-ui/src/plugins/i18n/locales/en.json index 64dce45c60..b398af6c24 100644 --- a/packages/editor-ui/src/plugins/i18n/locales/en.json +++ b/packages/editor-ui/src/plugins/i18n/locales/en.json @@ -1290,18 +1290,26 @@ "settings.versionControl.actionBox.title": "Available on Enterprise plan", "settings.versionControl.actionBox.description": "Use Version Control to connect your instance to an external Git repository to backup and track changes made to your workflows, variables, and credentials. With Version Control you can also sync instances across multiple environments (development, production...).", "settings.versionControl.actionBox.buttonText": "See plans", - "settings.versionControl.description": "Versioning allows you to connect your n8n instance to a Git branch of a repository. You can connect your branches to multiples n8n instances to create a multi environments setup. Learn how to set up versioning and environments in n8n.", - "settings.versionControl.repoUrl": "Git repository URL", + "settings.versionControl.description": "Versioning allows you to connect your n8n instance to a Git branch of a repository. You can connect your branches to multiples n8n instances to create a multi environments setup. {link}", + "settings.versionControl.description.link": "Learn how to set up versioning and environments in n8n.", + "settings.versionControl.gitConfig": "Git configuration", + "settings.versionControl.repoUrl": "Git repository URL (SSH)", "settings.versionControl.repoUrlPlaceholder": "e.g. git@github.com:my-team/my-repository", "settings.versionControl.repoUrlDescription": "The SSH url of your Git repository", - "settings.versionControl.authorName": "Author name", - "settings.versionControl.authorEmail": "Author email", + "settings.versionControl.authorName": "Commit author name", + "settings.versionControl.authorEmail": "Commit author email", "settings.versionControl.sshKey": "SSH Key", "settings.versionControl.sshKeyDescription": "Paste the SSH key in yout git repository settings. {link}.", "settings.versionControl.sshKeyDescriptionLink": "More info.", "settings.versionControl.button.continue": "Continue", "settings.versionControl.button.connect": "Connect", - "settings.versionControl.branches": "Select branch", + "settings.versionControl.button.save": "Save settings", + "settings.versionControl.instanceSettings": "Instance settings", + "settings.versionControl.branches": "Branch connected to this n8n instance", + "settings.versionControl.readonly": "{bold}: prevent editing workflows (recommended for production environments). {link}", + "settings.versionControl.readonly.bold": "Read-only instance", + "settings.versionControl.readonly.link": "Learn more.", + "settings.versionControl.color": "Color", "settings.versionControl.switchBranch.title": "Switch to {branch} branch", "settings.versionControl.switchBranch.description": "Please confirm you want to switch the current n8n instance to the branch: {branch}", "settings.versionControl.sync.prompt.title": "Sync changes in {branch} branch", diff --git a/packages/editor-ui/src/stores/versionControl.store.ts b/packages/editor-ui/src/stores/versionControl.store.ts index 6cc0da32db..8198364321 100644 --- a/packages/editor-ui/src/stores/versionControl.store.ts +++ b/packages/editor-ui/src/stores/versionControl.store.ts @@ -16,12 +16,13 @@ export const useVersionControlStore = defineStore('versionControl', () => { ); const preferences = reactive({ - branchName: '', + currentBranch: '', + branches: [], authorName: '', authorEmail: '', repositoryUrl: '', branchReadOnly: false, - branchColor: '#000000', + branchColor: '#F4A6DC', connected: false, publicKey: '', }); @@ -77,6 +78,7 @@ export const useVersionControlStore = defineStore('versionControl', () => { return { isEnterpriseVersionControlEnabled, state, + preferences, initSsh, initRepository, sync, diff --git a/packages/editor-ui/src/views/SettingsVersionControl.vue b/packages/editor-ui/src/views/SettingsVersionControl.vue index ca1971b1aa..bb5ca35247 100644 --- a/packages/editor-ui/src/views/SettingsVersionControl.vue +++ b/packages/editor-ui/src/views/SettingsVersionControl.vue @@ -1,19 +1,14 @@