mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 02:51:14 +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:
@@ -337,7 +337,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import { defineComponent } from 'vue';
|
||||
import { mapStores } from 'pinia';
|
||||
|
||||
@@ -537,7 +536,7 @@ export default defineComponent({
|
||||
workflowSettings.maxExecutionTimeout = this.rootStore.maxExecutionTimeout;
|
||||
}
|
||||
|
||||
Vue.set(this, 'workflowSettings', workflowSettings);
|
||||
this.workflowSettings = workflowSettings;
|
||||
this.timeoutHMS = this.convertToHMS(workflowSettings.executionTimeout);
|
||||
this.isLoading = false;
|
||||
|
||||
@@ -752,7 +751,7 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
async loadWorkflows() {
|
||||
const workflows = await this.workflowsStore.fetchAllWorkflows();
|
||||
const workflows = (await this.workflowsStore.fetchAllWorkflows()) as IWorkflowShortResponse[];
|
||||
workflows.sort((a, b) => {
|
||||
if (a.name.toLowerCase() < b.name.toLowerCase()) {
|
||||
return -1;
|
||||
@@ -763,13 +762,12 @@ export default defineComponent({
|
||||
return 0;
|
||||
});
|
||||
|
||||
// @ts-ignore
|
||||
workflows.unshift({
|
||||
id: undefined as unknown as string,
|
||||
name: this.$locale.baseText('workflowSettings.noWorkflow'),
|
||||
});
|
||||
} as IWorkflowShortResponse);
|
||||
|
||||
Vue.set(this, 'workflows', workflows);
|
||||
this.workflows = workflows;
|
||||
},
|
||||
async saveSettings() {
|
||||
// Set that the active state should be changed
|
||||
|
||||
Reference in New Issue
Block a user