diff --git a/components/home/FilterPanel.tsx b/components/home/FilterPanel.tsx index 7ddd5f5..bfaf53c 100644 --- a/components/home/FilterPanel.tsx +++ b/components/home/FilterPanel.tsx @@ -90,11 +90,11 @@ function FilterPanel(props: FilterPanelProps) { const activeFilterCount = [selectedMaterialType, selectedCategory, selectedScene, selectedPlatform, selectedProductCategory, selectedMonth].filter(Boolean).length const tabBase = 'relative shrink-0 whitespace-nowrap pb-3 text-[15px] tracking-[-0.02em] transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#1a1c1d]/70 focus-visible:ring-offset-2 rounded-sm' const tabActive = 'text-[#1a1c1d]' - const tabInactive = 'text-[#86898e] hover:text-[#1a1c1d]' + const tabInactive = 'text-[#6b7075] hover:text-[#1a1c1d]' const chipBase = 'text-[14px] tracking-[-0.02em] transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#1a1c1d]/70 focus-visible:ring-offset-2 rounded-sm' const chipActive = 'text-[#1a1c1d]' - const chipInactive = 'text-[#86898e] hover:text-[#1a1c1d]' - const countMuted = (active: boolean) => (active ? 'text-[#6b7075]' : 'text-[#86898e]') + const chipInactive = 'text-[#6b7075] hover:text-[#1a1c1d]' + const countClass = 'font-en text-[12px] font-medium tabular-nums tracking-[0.08em] text-[#86898e]' const countText = (value: number) => (facetsLoading ? '…' : value.toLocaleString('zh-CN')) const rankedTypes = useMemo(() => { const hasCounts = materialTypes.some((type) => (type.count || 0) > 0) @@ -212,7 +212,7 @@ function FilterPanel(props: FilterPanelProps) { const renderTypeTab = (label: string, count: number, active: boolean, onClick: () => void) => ( ) @@ -241,7 +241,7 @@ function FilterPanel(props: FilterPanelProps) { className={`${tabBase} ${moreActive || moreOpen ? tabActive : tabInactive}`} > 更多 - {overflowTypes.length} + {overflowTypes.length} {(moreActive || moreOpen) && } {moreOpen && ( @@ -257,7 +257,7 @@ function FilterPanel(props: FilterPanelProps) { className={`flex w-full items-baseline justify-between gap-6 px-4 py-2.5 text-left text-[14px] tracking-[-0.02em] transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#1a1c1d]/70 ${active ? 'text-[#1a1c1d]' : 'text-[#6b7075] hover:bg-[#fafafa] hover:text-[#1a1c1d]'}`} > {type.label} - {countText(type.count || 0)} + {countText(type.count || 0)} ) })} @@ -271,11 +271,11 @@ function FilterPanel(props: FilterPanelProps) {
@@ -291,7 +291,7 @@ function FilterPanel(props: FilterPanelProps) {- 共 {facetsLoading ? '…' : materialsCount.toLocaleString('zh-CN')} 条 + 共 {facetsLoading ? '…' : materialsCount.toLocaleString('zh-CN')} 条 {selectedMaterialType && {facetsLoading ? '计数加载中' : `${materialsCount} 个素材`}}
- {fileSizeLabel && <>{fileSizeLabel} · >} + {fileSizeLabel && <>{fileSizeLabel} · >} {material.authorName && <>{material.authorName} · >} - {format(new Date(material.createdAt), 'yyyy.MM.dd')} + {format(new Date(material.createdAt), 'yyyy.MM.dd')} {material.materialType && <> · {material.materialType}>} {material.categoryName && <> · {material.categoryName}>} {material.sceneName && <> · {material.sceneName}>} @@ -661,7 +661,7 @@ export default function MaterialCard({ }`} title={material.isLiked ? '取消点赞' : '点赞'} > - 点赞 {material.likeCount} + 点赞 {material.likeCount} {session?.user && (