mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 20:00:02 +00:00
feat(editor): Easy AI workflow improvements (#12400)
This commit is contained in:
committed by
GitHub
parent
f56ad8cf49
commit
8dc691dc62
@@ -7,7 +7,7 @@ import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import { onMounted } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import type { IWorkflowDataCreate } from '@/Interface';
|
||||
import { EASY_AI_WORKFLOW_JSON, SAMPLE_SUBWORKFLOW_WORKFLOW } from '@/constants.workflows';
|
||||
import { SAMPLE_SUBWORKFLOW_WORKFLOW } from '@/constants.workflows';
|
||||
|
||||
const loadingService = useLoadingService();
|
||||
const templateStore = useTemplatesStore();
|
||||
@@ -21,11 +21,6 @@ const openWorkflowTemplate = async (templateId: string) => {
|
||||
await openSampleSubworkflow();
|
||||
return;
|
||||
}
|
||||
if (templateId === EASY_AI_WORKFLOW_JSON.meta.templateId) {
|
||||
await openEasyAIWorkflow();
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
loadingService.startLoading();
|
||||
const template = await templateStore.getFixedWorkflowTemplate(templateId);
|
||||
@@ -63,21 +58,6 @@ const openWorkflowTemplate = async (templateId: string) => {
|
||||
}
|
||||
};
|
||||
|
||||
const openEasyAIWorkflow = async () => {
|
||||
try {
|
||||
loadingService.startLoading();
|
||||
const newWorkflow = await workflowsStore.createNewWorkflow(EASY_AI_WORKFLOW_JSON);
|
||||
await router.replace({
|
||||
name: VIEWS.WORKFLOW,
|
||||
params: { name: newWorkflow.id },
|
||||
});
|
||||
loadingService.stopLoading();
|
||||
} catch (e) {
|
||||
await router.replace({ name: VIEWS.NEW_WORKFLOW });
|
||||
loadingService.stopLoading();
|
||||
}
|
||||
};
|
||||
|
||||
const openSampleSubworkflow = async () => {
|
||||
try {
|
||||
loadingService.startLoading();
|
||||
|
||||
Reference in New Issue
Block a user