feat: enrich game cards with bestFps, raw/poor performer badges, and battery estimates (Tasks 5.1-5.6)
This commit is contained in:
@@ -40,6 +40,10 @@ interface GamesListItem {
|
||||
deckStatus: string | null
|
||||
antiCheatRelevant: boolean
|
||||
antiCheatStatus: "none" | "supported" | "unsupported" | "unknown" | null
|
||||
bestFps: number | null
|
||||
isRawPerformer: boolean
|
||||
isPoorPerformance: boolean
|
||||
estimatedBatteryMin: number | null
|
||||
}
|
||||
|
||||
interface DeviceOption {
|
||||
@@ -914,6 +918,26 @@ function GameCard({ game }: { game: GamesListItem }) {
|
||||
{game.steamReviewScore}%
|
||||
</span>
|
||||
)}
|
||||
{game.isRawPerformer && (
|
||||
<span className='inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-green-500/10 border border-green-500/20 text-green-400 text-[10px] font-semibold shrink-0'>
|
||||
⚡ RAW PERFORMER
|
||||
</span>
|
||||
)}
|
||||
{game.isPoorPerformance && (
|
||||
<span className='inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-red-500/10 border border-red-500/20 text-red-400 text-[10px] font-semibold shrink-0'>
|
||||
⚠ POOR PERFORMANCE
|
||||
</span>
|
||||
)}
|
||||
{game.bestFps != null && (
|
||||
<span className='inline-flex items-center gap-1 text-[10px] text-text/50'>
|
||||
{Math.round(game.bestFps)}fps best
|
||||
</span>
|
||||
)}
|
||||
{game.estimatedBatteryMin != null && (
|
||||
<span className='inline-flex items-center gap-1 text-[10px] text-text/50'>
|
||||
🔋 ~{Math.round(game.estimatedBatteryMin / 60)}h
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<div className='mt-1.5 flex items-center gap-2 flex-wrap'>
|
||||
{game.benchmarkCount > 0 ? (
|
||||
|
||||
Reference in New Issue
Block a user