feat(plugin-market): move extension count into search box placeholder

Mirror the langbot-space marketplace change: drop the '共 xxx 个扩展'
stats line below the tag filter, surface the count in the search
placeholder ('搜索 xxx 个扩展、能力或场景...') when no query is active,
and show the total at the bottom via allLoadedCount when searching.
Adds searchPlaceholderCount + allLoadedCount to all 8 locales.
This commit is contained in:
RockChinQ
2026-06-06 11:33:46 -04:00
parent 38759b229d
commit 073acaa053
9 changed files with 30 additions and 11 deletions
@@ -632,7 +632,11 @@ function MarketPageContent({
<div className="relative min-w-0 flex-1 lg:max-w-xl">
<Search className="absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground h-4 w-4" />
<Input
placeholder={t('market.searchPlaceholder')}
placeholder={
total > 0
? t('market.searchPlaceholderCount', { count: total })
: t('market.searchPlaceholder')
}
value={searchQuery}
onChange={(e) => handleSearchInputChange(e.target.value)}
onCompositionStart={() => {
@@ -816,15 +820,6 @@ function MarketPageContent({
);
})}
</div>
{/* 搜索结果统计 */}
{total > 0 && (
<div className="text-center text-muted-foreground text-sm">
{searchQuery
? t('market.searchResults', { count: total })
: t('market.totalPlugins', { count: total })}
</div>
)}
</div>
{/* Scrollable extension list section */}
@@ -884,7 +879,9 @@ function MarketPageContent({
{/* No more data hint */}
{!hasMore && plugins.length > 0 && (
<div className="text-center text-muted-foreground py-6">
{t('market.allLoaded')}
{searchQuery
? t('market.allLoadedCount', { count: total })
: t('market.allLoaded')}
{' · '}
<a
href="https://github.com/langbot-app/langbot-plugin-demo/issues/new?template=plugin-request.yml"