feat: 在搜尋控制與詞卡清單間添加詞卡數目統計顯示
- 添加詞卡總數和當前頁面詞卡數量顯示 - 支援分頁時顯示頁面信息 - 添加快取狀態指示器 - 提升用戶對搜尋結果的認知 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
51cdd521b1
commit
f7ee5be06c
|
|
@ -236,6 +236,23 @@ function FlashcardsContent() {
|
||||||
setShowAdvancedSearch={setShowAdvancedSearch}
|
setShowAdvancedSearch={setShowAdvancedSearch}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
{/* 詞卡數目統計 */}
|
||||||
|
<div className="flex justify-between items-center mb-4">
|
||||||
|
<h3 className="text-lg font-semibold">
|
||||||
|
共 {searchState.pagination.totalCount} 個詞卡
|
||||||
|
{searchState.pagination.totalPages > 1 && (
|
||||||
|
<span className="text-sm font-normal text-gray-600 ml-2">
|
||||||
|
(第 {searchState.pagination.currentPage} 頁,顯示 {searchState.flashcards.length} 個)
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</h3>
|
||||||
|
{searchState.cacheHit && (
|
||||||
|
<span className="text-xs text-green-600 bg-green-50 px-2 py-1 rounded-full">
|
||||||
|
快取
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Search Results */}
|
{/* Search Results */}
|
||||||
<SearchResults
|
<SearchResults
|
||||||
searchState={searchState}
|
searchState={searchState}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue