feat(editor): Select credentials in template setup if theres only one (#7879)

Automatically select credentials in the template credential setup if
there's only one available.

NOTE! This feature is still behind a feature flag. To test, set:

```js
localStorage.setItem('template-credentials-setup', 'true')
```


https://github.com/n8n-io/n8n/assets/10324676/edc1f586-214f-4c37-b7ec-dd1786433dc1
This commit is contained in:
Tomi Turtiainen
2023-11-30 15:46:14 +02:00
committed by GitHub
parent e0b7f89035
commit fe3417a615
4 changed files with 466 additions and 0 deletions

View File

@@ -817,10 +817,20 @@ export interface ITemplatesWorkflow {
};
}
export interface ITemplatesWorkflowInfo {
nodeCount: number;
nodeTypes: {
[key: string]: {
count: number;
};
};
}
export interface ITemplatesWorkflowResponse extends ITemplatesWorkflow, IWorkflowTemplate {
description: string | null;
image: ITemplatesImage[];
categories: ITemplatesCategory[];
workflowInfo: ITemplatesWorkflowInfo;
}
/**
@@ -1010,6 +1020,7 @@ export interface IVersionNode {
}
export interface ITemplatesNode extends IVersionNode {
id: number;
categories?: ITemplatesCategory[];
}