{
- setVisibleCount(count => Math.min(count + INITIAL_VISIBLE_COUNT, maxAvailable))
+ setVisibleCount((count) => {
+ if (count >= maxAvailable)
+ return INITIAL_VISIBLE_COUNT
+
+ return Math.min(count + INITIAL_VISIBLE_COUNT, maxAvailable)
+ })
}}
>
-
+ {isExpanded ? (
+
+ ) : (
+
+ )}
- {t('workflow.tabs.showMoreFeatured')}
+ {t(isExpanded ? 'workflow.tabs.showLessFeatured' : 'workflow.tabs.showMoreFeatured')}
)}
diff --git a/web/i18n/en-US/workflow.ts b/web/i18n/en-US/workflow.ts
index 150b9a8902..61d1d010f0 100644
--- a/web/i18n/en-US/workflow.ts
+++ b/web/i18n/en-US/workflow.ts
@@ -279,6 +279,7 @@ const translation = {
'searchDataSource': 'Search Data Source',
'featuredTools': 'Featured',
'showMoreFeatured': 'Show more',
+ 'showLessFeatured': 'Show less',
'installed': 'Installed',
'pluginByAuthor': 'By {{author}}',
'usePlugin': 'Select tool',
diff --git a/web/i18n/zh-Hans/workflow.ts b/web/i18n/zh-Hans/workflow.ts
index 51ae3b8050..759b628144 100644
--- a/web/i18n/zh-Hans/workflow.ts
+++ b/web/i18n/zh-Hans/workflow.ts
@@ -265,6 +265,7 @@ const translation = {
'start': '开始',
'featuredTools': '精选推荐',
'showMoreFeatured': '查看更多',
+ 'showLessFeatured': '收起',
'installed': '已安装',
'pluginByAuthor': '来自 {{author}}',
'usePlugin': '选择工具',