优化显示

This commit is contained in:
truewhile
2026-09-15 18:26:20 +08:00
parent 531e45f677
commit a5731fa963
+8 -15
View File
@@ -79,25 +79,18 @@ export const MediaCard = memo(function MediaCard({
</div> </div>
)} )}
{/* Episode count badge */} {/* Episode count badge:统一放右下角(桌面端与移动端一致),与左上角评分彻底错开 */}
{count !== undefined && count > 1 && ( {(count !== undefined && count > 1) || (count === undefined && versionCount > 1) ? (
<span className="absolute right-3 top-3 inline-flex items-center gap-1 rounded-xl border border-white/15 bg-[#111827]/90 px-2 py-1 text-[10px] font-bold text-white shadow-sm"> <span className="absolute bottom-2 right-2 inline-flex items-center gap-1 rounded-lg border border-white/15 bg-[#111827]/90 px-1.5 py-0.5 text-[10px] font-bold text-white shadow-sm">
<Layers size={10} className="text-[#c9954a]" /> <Layers size={10} className="shrink-0 text-[#c9954a]" />
<span>{count} 集</span> <span>{count !== undefined && count > 1 ? `${count} 集` : `${versionCount} 版本`}</span>
</span> </span>
)} ) : null}
{count === undefined && versionCount > 1 && (
<span className="absolute right-3 top-3 inline-flex items-center gap-1 rounded-xl border border-white/15 bg-[#111827]/90 px-2 py-1 text-[10px] font-bold text-white shadow-sm">
<Layers size={10} className="text-[#c9954a]" />
<span>{versionCount} 版本</span>
</span>
)}
{/* Rating Badge */} {/* Rating Badge */}
{displayRating > 0 && ( {displayRating > 0 && (
<span className="absolute left-3 top-3 inline-flex items-center gap-0.5 rounded-xl border border-white/15 bg-[#111827]/90 px-2 py-1 text-[10px] font-bold text-[#c9954a] shadow-sm"> <span className="absolute left-2 top-2 inline-flex items-center gap-0.5 rounded-lg border border-white/15 bg-[#111827]/90 px-1.5 py-0.5 text-[10px] font-bold text-[#c9954a] shadow-sm">
<Star size={10} fill="currentColor" /> <Star size={10} fill="currentColor" className="shrink-0" />
<span>{displayRating.toFixed(1)}</span> <span>{displayRating.toFixed(1)}</span>
</span> </span>
)} )}