fix(editor): Adding branch color (#6380)
* fix(editor): Adding branch color * fix(editor): backend refactor preferences update * fix(editor): frontend refactor preferences update
This commit is contained in:
@@ -2,8 +2,7 @@
|
||||
import { computed, reactive, onBeforeMount, ref } from 'vue';
|
||||
import type { Rule, RuleGroup } from 'n8n-design-system/types';
|
||||
import { MODAL_CONFIRM, VALID_EMAIL_REGEX } from '@/constants';
|
||||
import { useVersionControlStore } from '@/stores/versionControl.store';
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
import { useUIStore, useVersionControlStore } from '@/stores';
|
||||
import { useToast, useMessage, useLoadingService, useI18n } from '@/composables';
|
||||
import CopyInput from '@/components/CopyInput.vue';
|
||||
|
||||
@@ -67,10 +66,11 @@ const onDisconnect = async () => {
|
||||
const onSave = async () => {
|
||||
loadingService.startLoading();
|
||||
try {
|
||||
await Promise.all([
|
||||
versionControlStore.setBranch(versionControlStore.preferences.branchName),
|
||||
versionControlStore.setBranchReadonly(versionControlStore.preferences.branchReadOnly),
|
||||
]);
|
||||
await versionControlStore.updatePreferences({
|
||||
branchName: versionControlStore.preferences.branchName,
|
||||
branchReadOnly: versionControlStore.preferences.branchReadOnly,
|
||||
branchColor: versionControlStore.preferences.branchColor,
|
||||
});
|
||||
toast.showMessage({
|
||||
title: locale.baseText('settings.versionControl.saved.title'),
|
||||
type: 'success',
|
||||
@@ -92,7 +92,7 @@ const goToUpgrade = () => {
|
||||
uiStore.goToUpgrade('version-control', 'upgrade-version-control');
|
||||
};
|
||||
|
||||
onBeforeMount(async () => {
|
||||
onBeforeMount(() => {
|
||||
if (versionControlStore.preferences.connected) {
|
||||
isConnected.value = true;
|
||||
void versionControlStore.getBranches();
|
||||
@@ -318,12 +318,12 @@ async function refreshSshKey() {
|
||||
</i18n>
|
||||
</n8n-checkbox>
|
||||
</div>
|
||||
<!-- <div :class="$style.group">
|
||||
<div :class="$style.group">
|
||||
<label>{{ locale.baseText('settings.versionControl.color') }}</label>
|
||||
<div>
|
||||
<n8n-color-picker size="small" v-model="versionControlStore.preferences.branchColor" />
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div :class="[$style.group, 'pt-s']">
|
||||
<n8n-button
|
||||
@click="onSave"
|
||||
|
||||
Reference in New Issue
Block a user