fix team app template search (#5514)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions

This commit is contained in:
heheer 2025-08-21 20:41:46 +08:00 committed by GitHub
parent e19eddf976
commit a92917c05f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 26 additions and 14 deletions

View File

@ -95,6 +95,7 @@ export const iconPaths = {
'common/refreshLight': () => import('./icons/common/refreshLight.svg'),
'common/resultLight': () => import('./icons/common/resultLight.svg'),
'common/retryLight': () => import('./icons/common/retryLight.svg'),
'common/rightArrow': () => import('./icons/common/rightArrow.svg'),
'common/rightArrowFill': () => import('./icons/common/rightArrowFill.svg'),
'common/rightArrowLight': () => import('./icons/common/rightArrowLight.svg'),
'common/routePushLight': () => import('./icons/common/routePushLight.svg'),

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 5 8" fill="none">
<path d="M3.08596 3.99987L0.610962 1.52487L1.31796 0.817871L4.49996 3.99987L1.31796 7.18187L0.610962 6.47487L3.08596 3.99987Z" />
</svg>

After

Width:  |  Height:  |  Size: 210 B

View File

@ -1,3 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 5 8" fill="none">
<path d="M3.08596 3.99987L0.610962 1.52487L1.31796 0.817871L4.49996 3.99987L1.31796 7.18187L0.610962 6.47487L3.08596 3.99987Z" />
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 17" fill="none">
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.52851 3.82783C5.26816 4.08818 5.26816 4.51029 5.52851 4.77064L9.05711 8.29923L5.52851 11.8278C5.26816 12.0882 5.26816 12.5103 5.52851 12.7706C5.78886 13.031 6.21097 13.031 6.47132 12.7706L10.4713 8.77064C10.7317 8.51029 10.7317 8.08818 10.4713 7.82783L6.47132 3.82783C6.21097 3.56748 5.78886 3.56748 5.52851 3.82783Z" />
</svg>

Before

Width:  |  Height:  |  Size: 210 B

After

Width:  |  Height:  |  Size: 454 B

View File

@ -204,7 +204,7 @@ export function usePagination<DataT, ResT = {}>(
<IconButton
isDisabled={pageNum === maxPage}
icon="common/rightArrowLight"
icon="common/rightArrow"
onClick={() => fetchData(pageNum + 1)}
/>
{isPc && (

View File

@ -1,10 +1,10 @@
import MyBox from '@fastgpt/web/components/common/MyBox';
import React, { useMemo } from 'react';
import React from 'react';
import { useContextSelector } from 'use-context-selector';
import { EDGE_TYPE, FlowNodeTypeEnum } from '@fastgpt/global/core/workflow/node/constant';
import type { FlowNodeItemType } from '@fastgpt/global/core/workflow/type/node';
import { type Node, useReactFlow } from 'reactflow';
import { WorkflowInitContext, WorkflowNodeEdgeContext } from '../context/workflowInitContext';
import { type Node } from 'reactflow';
import { WorkflowNodeEdgeContext } from '../context/workflowInitContext';
import { useMemoizedFn } from 'ahooks';
import NodeTemplateListHeader from './components/NodeTemplates/header';
import NodeTemplateList from './components/NodeTemplates/list';

View File

@ -9,6 +9,7 @@ import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
import { getSystemPluginPaths } from '@/web/core/app/api/plugin';
import { getAppFolderPath } from '@/web/core/app/api/app';
import FolderPath from '@/components/common/folder/Path';
import { useDebounceEffect } from 'ahooks';
export enum TemplateTypeEnum {
'basic' = 'basic',
@ -47,13 +48,19 @@ const NodeTemplateListHeader = ({
setSearchKey('');
}, [templateType]);
useEffect(() => {
loadNodeTemplates({
type: templateType,
parentId: '',
searchVal: searchKey
});
}, [searchKey, loadNodeTemplates, templateType]);
useDebounceEffect(
() => {
loadNodeTemplates({
type: templateType,
parentId: '',
searchVal: searchKey
});
},
[searchKey, loadNodeTemplates, templateType],
{
wait: 300
}
);
// Get paths
const { data: paths = [] } = useRequest2(

View File

@ -83,7 +83,8 @@ export const useNodeTemplates = () => {
if (type === TemplateTypeEnum.teamPlugin) {
// app, workflow-plugin, mcp
return getTeamPlugTemplates({
parentId
parentId,
searchKey: searchVal
}).then((res) => res.filter((app) => app.id !== appId));
}
if (type === TemplateTypeEnum.systemPlugin) {