fix: 适配手机端搜索入口与底部 Sheet 面板

顶栏改为可伸展搜索 pill,面板改为自底部滑出并优化筛选条与触控布局。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-27 23:39:32 +08:00
parent 55b1831da2
commit f559fc4c4b
3 changed files with 211 additions and 9 deletions

View File

@@ -392,12 +392,23 @@ export default function MainLayout() {
{!isCompose && isMobile && (
<button
type="button"
className="header-icon-btn header-search-toggle"
className={cn(
'header-search-mobile-pill',
(keywordDraft || postSearch.filters.isFiltered) && 'header-search-mobile-pill--active',
)}
onClick={openSearchPanel}
aria-label="搜索帖子"
title="搜索"
>
<Search size={18} aria-hidden />
<Search size={15} aria-hidden className="header-search-mobile-pill__icon" />
<span className="header-search-mobile-pill__text">
{keywordDraft
|| postSearch.filters.keyword
|| postSearch.filters.author
|| '搜索帖子…'}
</span>
{postSearch.filters.hasAdvancedFilters && (
<span className="header-search-mobile-pill__dot" aria-hidden />
)}
</button>
)}