feat(web): add search functionality and empty states to MCP market

- Add search input with debouncing (500ms) to filter MCP services by keywords
- Implement server-side search via keywords parameter in getMarketMCPs API call
- Add new i18n strings for empty states: marketNoData, marketNoDataDesc, marketNoSearchResult, marketNoSearchResultDesc
- Replace client-side filtering with server-side search for better performance
- Update Empty component display to show different messages for no data vs no search results
- Remove BodyWrapper component and implement custom empty state handling
- Add searchTimerRef to manage debounce timer lifecycle
- Update loadMore callback to include searchKeyword parameter for pagination consistency
- Add allowClear prop to search input for better UX
- Remove conditional rendering of search input to keep it always visible
This commit is contained in:
yujiangping
2026-03-11 18:24:46 +08:00
parent 01da2e3eee
commit 59618457df
5 changed files with 84 additions and 26 deletions

View File

@@ -1820,6 +1820,10 @@ Memory Bear: After the rebellion, regional warlordism intensified for several re
marketRefresh: 'Refresh',
marketConfigBtn: 'Configure',
marketConfigConnection: 'Configure Connection',
marketNoData: 'No Data',
marketNoDataDesc: 'This market currently has no available services',
marketNoSearchResult: 'No Search Results',
marketNoSearchResultDesc: 'No matching services found, please try other keywords',
marketNoServices: 'No MCP Services Available',
marketNotConnected: 'Not Connected to This Market',
marketNoServicesDesc: 'This market currently has no available services',