diff --git a/components/global-search/search-facets.tsx b/components/global-search/search-facets.tsx index a9ab2e9b5..bd82e9611 100644 --- a/components/global-search/search-facets.tsx +++ b/components/global-search/search-facets.tsx @@ -18,19 +18,38 @@ export interface SearchFacetsProps { onFlatChange: (flat: boolean) => void; } +/** Section title, styled like the mail sidebar's section rows. */ +function FacetSection({ title, first, children }: { title: string; first?: boolean; children: React.ReactNode }) { + return ( +
+
+ {title} +
+ {children} +
+ ); +} + +/** One facet row, styled like a mail sidebar folder row (start-border selection marker). */ function FacetButton({ active, label, count, onClick }: { active: boolean; label: string; count?: string; onClick: () => void }) { return ( ); } @@ -45,9 +64,8 @@ export function SearchFacets({ const total = SEARCH_KINDS.reduce((sum, kind) => sum + kindCounts[kind], 0); const anyMore = SEARCH_KINDS.some((kind) => kindHasMore[kind]); return ( -
-
-

{t('scope_label')}

+
+ onScopeChange(kind)} /> ))} -
+ {accounts.length > 1 && ( -
-

{t('account_label')}

+ onAccountChange(null)} /> {accounts.map((account) => ( onAccountChange(account.localAccountId)} /> ))} -
+ )} -
+ onFlatChange(false)} /> onFlatChange(true)} /> -
+
); } diff --git a/components/global-search/search-tab-body.tsx b/components/global-search/search-tab-body.tsx index 7d0a60d7d..17c5d1dbe 100644 --- a/components/global-search/search-tab-body.tsx +++ b/components/global-search/search-tab-body.tsx @@ -90,8 +90,8 @@ export function SearchTabBody({ tabId, data }: SearchTabBodyProps) { const handleOpen = (hit: GlobalSearchHit) => { void openHit(hit, { proShell: true }); }; return ( -
-