fix(editor): Search by node name (no-changelog) (#17831)

This commit is contained in:
Romeo Balta
2025-08-01 09:00:06 +01:00
committed by GitHub
parent c2c3e08cdf
commit 491f2fa84d
2 changed files with 14 additions and 11 deletions

View File

@@ -114,6 +114,7 @@ export interface ITemplatesQuery {
categories: string[];
search: string;
apps?: string[];
nodes?: string[];
sort?: string;
combineWith?: string;
}
@@ -160,6 +161,7 @@ export async function getWorkflows(
search: string;
sort?: string;
apps?: string[];
nodes?: string[];
combineWith?: string;
},
headers?: RawAxiosRequestHeaders,
@@ -168,11 +170,12 @@ export async function getWorkflows(
workflows: ITemplatesWorkflow[];
filters: TemplateSearchFacet[];
}> {
const { apps, sort, combineWith, categories, ...restQuery } = query;
const { apps, sort, combineWith, categories, nodes, ...restQuery } = query;
const finalQuery = {
...restQuery,
category: stringifyArray(categories),
...(apps && { app: stringifyArray(apps) }),
...(apps && { apps: stringifyArray(apps) }),
...(nodes && { nodes: stringifyArray(nodes) }),
...(sort && { sort }),
...(combineWith && { combineWith }),
};

View File

@@ -17,14 +17,14 @@ import { computed, ref, watch } from 'vue';
const SIMPLE_TEMPLATES = [6270, 5271, 2178];
const PREDEFINED_TEMPLATES_BY_NODE = {
gmail: [5678, 4722, 5694],
googleSheets: [5694, 5690, 5906],
telegram: [5626, 2114, 4875],
openAi: [2462, 2722, 2178],
googleGemini: [5993, 6270, 5677],
googleCalendar: [2328, 3393, 2110],
youTube: [3188, 4846, 4506],
airtable: [3053, 2700, 2579],
'n8n-nodes-base.gmail': [5678, 4722, 5694],
'n8n-nodes-base.googleSheets': [5694, 5690, 5906],
'n8n-nodes-base.telegram': [5626, 2114, 4875],
'@n8n/n8n-nodes-langchain.openAi': [2462, 2722, 2178],
'@n8n/n8n-nodes-langchain.googleGemini': [5993, 6270, 5677],
'n8n-nodes-base.googleCalendar': [2328, 3393, 2110],
'n8n-nodes-base.youTube': [3188, 4846, 4506],
'n8n-nodes-base.airtable': [3053, 2700, 2579],
};
function getPredefinedFromSelected(selectedApps: string[]) {
@@ -139,7 +139,7 @@ export const usePersonalizedTemplatesStore = defineStore(STORES.PERSONALIZED_TEM
categories: [],
search: '',
sort: 'rank:desc',
apps: selectedApps.length > 0 ? selectedApps : undefined,
nodes: selectedApps.length > 0 ? selectedApps : undefined,
combineWith: 'or',
});