From 84b2913cd9d7cd213e35828fcd767bd4f2d053a3 Mon Sep 17 00:00:00 2001 From: Joel Date: Mon, 13 Oct 2025 11:12:10 +0800 Subject: [PATCH] feat: filter title --- web/app/components/explore/app-list/index.tsx | 17 ++++++++++++++++- web/i18n/en-US/explore.ts | 2 ++ web/i18n/ja-JP/explore.ts | 2 ++ web/i18n/zh-Hans/explore.ts | 2 ++ 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/web/app/components/explore/app-list/index.tsx b/web/app/components/explore/app-list/index.tsx index 17930b6f0f..d40ced8784 100644 --- a/web/app/components/explore/app-list/index.tsx +++ b/web/app/components/explore/app-list/index.tsx @@ -23,6 +23,7 @@ import { import { useImportDSL } from '@/hooks/use-import-dsl' import DSLConfirmModal from '@/app/components/app/create-from-dsl-modal/dsl-confirm-modal' import Banner from '../banner' +import Button from '../../base/button' type AppsProps = { onSuccess?: () => void @@ -43,6 +44,12 @@ const Apps = ({ const [keywords, setKeywords] = useState('') const [searchKeywords, setSearchKeywords] = useState('') + const hasFilterCondition = !!keywords + const handleResetFilter = useCallback(() => { + setKeywords('') + setSearchKeywords('') + }, []) + const { run: handleSearch } = useDebounceFn(() => { setSearchKeywords(keywords) }, { wait: 500 }) @@ -150,7 +157,15 @@ const Apps = ({
-
{t('explore.apps.title')}
+
+
{!hasFilterCondition ? t('explore.apps.title') : t('explore.apps.resultNum', { num: searchFilteredList.length })}
+ {hasFilterCondition && ( + <> +
+ + + )} +