mirror of
https://github.com/KuekHaoYang/KVideo.git
synced 2026-08-15 00:33:44 +08:00
feat: Update secret page empty state text and prevent search history dropdown from rendering when empty.
This commit is contained in:
+3
-3
@@ -58,12 +58,12 @@ function SecretHomePage() {
|
||||
<NoResults onReset={handleReset} />
|
||||
)}
|
||||
|
||||
{/* Empty State - Hidden mode information */}
|
||||
{/* Empty State - Adult content zone */}
|
||||
{!loading && !hasSearched && (
|
||||
<div className="flex flex-col items-center justify-center py-20 text-center">
|
||||
<p className="text-lg text-[var(--text-color)] mb-2">隐藏模式已激活</p>
|
||||
<p className="text-lg text-[var(--text-color)] mb-2">18+ 专区</p>
|
||||
<p className="text-sm text-[var(--text-color-secondary)]">
|
||||
搜索后将显示结果,搜索记录不会保存到首页历史
|
||||
此区域的搜索记录不会显示在首页历史
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -50,7 +50,7 @@ export function SearchHistoryDropdown({
|
||||
}
|
||||
}, [highlightedIndex]);
|
||||
|
||||
if (!isOpen) {
|
||||
if (!isOpen || searchHistory.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -65,31 +65,25 @@ export function SearchHistoryDropdown({
|
||||
e.preventDefault();
|
||||
}}
|
||||
>
|
||||
{searchHistory.length === 0 ? (
|
||||
<SearchHistoryEmptyState />
|
||||
) : (
|
||||
<>
|
||||
{/* Header with clear all button */}
|
||||
<SearchHistoryHeader onClearAll={onClearAll} />
|
||||
{/* Header with clear all button */}
|
||||
<SearchHistoryHeader onClearAll={onClearAll} />
|
||||
|
||||
{/* Divider */}
|
||||
<div className="search-history-divider" />
|
||||
{/* Divider */}
|
||||
<div className="search-history-divider" />
|
||||
|
||||
{/* History items */}
|
||||
<div className="search-history-list">
|
||||
{searchHistory.map((item, index) => (
|
||||
<SearchHistoryListItem
|
||||
key={`${item.query}-${item.timestamp}`}
|
||||
item={item}
|
||||
index={index}
|
||||
isHighlighted={index === highlightedIndex}
|
||||
onSelectItem={onSelectItem}
|
||||
onRemoveItem={onRemoveItem}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
{/* History items */}
|
||||
<div className="search-history-list">
|
||||
{searchHistory.map((item, index) => (
|
||||
<SearchHistoryListItem
|
||||
key={`${item.query}-${item.timestamp}`}
|
||||
item={item}
|
||||
index={index}
|
||||
isHighlighted={index === highlightedIndex}
|
||||
onSelectItem={onSelectItem}
|
||||
onRemoveItem={onRemoveItem}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user