feat: Add onboarding flow (#7212)
Github issue / Community forum post (link here to close automatically):
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import { STORES } from '@/constants';
|
||||
import type {
|
||||
INodeUi,
|
||||
ITemplatesCategory,
|
||||
ITemplatesCollection,
|
||||
ITemplatesCollectionFull,
|
||||
@@ -19,6 +20,7 @@ import {
|
||||
getWorkflows,
|
||||
getWorkflowTemplate,
|
||||
} from '@/api/templates';
|
||||
import { getFixedNodesList } from '@/utils/nodeViewUtils';
|
||||
|
||||
const TEMPLATES_PAGE_SIZE = 10;
|
||||
|
||||
@@ -332,5 +334,19 @@ export const useTemplatesStore = defineStore(STORES.TEMPLATES, {
|
||||
const versionCli: string = settingsStore.versionCli;
|
||||
return getWorkflowTemplate(apiEndpoint, templateId, { 'n8n-version': versionCli });
|
||||
},
|
||||
|
||||
async getFixedWorkflowTemplate(templateId: string): Promise<IWorkflowTemplate | undefined> {
|
||||
const template = await this.getWorkflowTemplate(templateId);
|
||||
if (template?.workflow?.nodes) {
|
||||
template.workflow.nodes = getFixedNodesList(template.workflow.nodes) as INodeUi[];
|
||||
template.workflow.nodes?.forEach((node) => {
|
||||
if (node.credentials) {
|
||||
delete node.credentials;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return template;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user