Merge remote-tracking branch 'origin/master' into release/1.0.1

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-07-05 20:01:24 +02:00
193 changed files with 16701 additions and 4702 deletions

View File

@@ -53,7 +53,7 @@ export const useCloudPlanStore = defineStore('cloudPlan', () => {
state.loadingPlan = true;
let plan;
try {
plan = await getCurrentPlan(rootStore.getRestCloudApiContext, `${cloudUserId}`);
plan = await getCurrentPlan(rootStore.getRestApiContext);
state.data = plan;
state.loadingPlan = false;
} catch (error) {

View File

@@ -1,27 +1,34 @@
import { computed, reactive } from 'vue';
import { defineStore } from 'pinia';
import { EnterpriseEditionFeature } from '@/constants';
import { useSettingsStore } from '@/stores/settings.store';
import { useSettingsStore, useRootStore, useUsersStore } from '@/stores';
import * as vcApi from '@/api/sourceControl';
import { useRootStore } from '@/stores/n8nRoot.store';
import type { SourceControlPreferences } from '@/Interface';
export const useSourceControlStore = defineStore('sourceControl', () => {
const rootStore = useRootStore();
const settingsStore = useSettingsStore();
const usersStore = useUsersStore();
const isEnterpriseSourceControlEnabled = computed(() =>
settingsStore.isEnterpriseFeatureEnabled(EnterpriseEditionFeature.SourceControl),
);
const defaultAuthor = computed(() => {
const user = usersStore.currentUser;
return {
name: user?.fullName ?? `${user?.firstName} ${user?.lastName}`.trim(),
email: user?.email ?? '',
};
});
const preferences = reactive<SourceControlPreferences>({
branchName: '',
branches: [],
authorName: '',
authorEmail: '',
authorName: defaultAuthor.value.name,
authorEmail: defaultAuthor.value.email,
repositoryUrl: '',
branchReadOnly: false,
branchColor: '#F4A6DC',
branchColor: '#5296D6',
connected: false,
publicKey: '',
});

View File

@@ -31,6 +31,7 @@ import {
WORKFLOW_SETTINGS_MODAL_KEY,
WORKFLOW_SHARE_MODAL_KEY,
SOURCE_CONTROL_PUSH_MODAL_KEY,
SOURCE_CONTROL_PULL_MODAL_KEY,
} from '@/constants';
import type {
CurlToJSONResponse,
@@ -137,6 +138,9 @@ export const useUIStore = defineStore(STORES.UI, {
[SOURCE_CONTROL_PUSH_MODAL_KEY]: {
open: false,
},
[SOURCE_CONTROL_PULL_MODAL_KEY]: {
open: false,
},
},
modalStack: [],
sidebarMenuCollapsed: true,