mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 11:22:15 +00:00
feat: Replace all Vue.set usages with direct assignment and spread operator (no-changelog) (#6280)
* refactor: replace all Vue.set usages with direct assignment and spread operator * chore: fix linting issue * fix: fix updateNodeAtIndex function * fix: various post-refactoring fixes * fix: refactor recently added Vue.set directive
This commit is contained in:
@@ -26,7 +26,6 @@ import type {
|
||||
WorkflowSettings,
|
||||
} from 'n8n-workflow';
|
||||
import { defineStore } from 'pinia';
|
||||
import Vue from 'vue';
|
||||
import { useRootStore } from './n8nRoot.store';
|
||||
import { useUIStore } from './ui.store';
|
||||
import { useUsersStore } from './users.store';
|
||||
@@ -220,13 +219,19 @@ export const useSettingsStore = defineStore(STORES.SETTINGS, {
|
||||
useVersionsStore().setVersionNotificationSettings(settings.versionNotifications);
|
||||
},
|
||||
stopShowingSetupPage(): void {
|
||||
Vue.set(this.userManagement, 'showSetupOnFirstLoad', false);
|
||||
this.userManagement.showSetupOnFirstLoad = false;
|
||||
},
|
||||
disableTemplates(): void {
|
||||
Vue.set(this.settings.templates, 'enabled', false);
|
||||
this.settings = {
|
||||
...this.settings,
|
||||
templates: {
|
||||
...this.settings.templates,
|
||||
enabled: false,
|
||||
},
|
||||
};
|
||||
},
|
||||
setPromptsData(promptsData: IN8nPrompts): void {
|
||||
Vue.set(this, 'promptsData', promptsData);
|
||||
this.promptsData = promptsData;
|
||||
},
|
||||
setAllowedModules(allowedModules: { builtIn?: string[]; external?: string[] }): void {
|
||||
this.settings.allowedModules = allowedModules;
|
||||
@@ -315,13 +320,13 @@ export const useSettingsStore = defineStore(STORES.SETTINGS, {
|
||||
return runLdapSync(rootStore.getRestApiContext, data);
|
||||
},
|
||||
setSaveDataErrorExecution(newValue: string) {
|
||||
Vue.set(this, 'saveDataErrorExecution', newValue);
|
||||
this.saveDataErrorExecution = newValue;
|
||||
},
|
||||
setSaveDataSuccessExecution(newValue: string) {
|
||||
Vue.set(this, 'saveDataSuccessExecution', newValue);
|
||||
this.saveDataSuccessExecution = newValue;
|
||||
},
|
||||
setSaveManualExecutions(saveManualExecutions: boolean) {
|
||||
Vue.set(this, 'saveManualExecutions', saveManualExecutions);
|
||||
this.saveManualExecutions = saveManualExecutions;
|
||||
},
|
||||
async getTimezones(): Promise<IDataObject> {
|
||||
const rootStore = useRootStore();
|
||||
|
||||
Reference in New Issue
Block a user