diff --git a/app/search/page.tsx b/app/search/page.tsx index 22218c5..e614d9e 100644 --- a/app/search/page.tsx +++ b/app/search/page.tsx @@ -17,6 +17,8 @@ import Image from "next/image" import Link from "next/link" import { useSession } from "@/lib/auth-client" import { WindowsIcon, MacIcon, LinuxIcon } from "@/app/components/PlatformIcons" +import { AntiCheatBadge } from "@/components/anti-cheat-badge" +import { PlayabilityBadge } from "@/components/playability-badge" interface UnifiedResult { kind: "local" | "steam" @@ -46,6 +48,13 @@ interface UnifiedResult { bestFps?: number | null latestVersion?: string | null tinyImage?: string | null + // Badges & review fields + playabilityStatus?: "great" | "playable" | "needs_tweaks" | "unplayable" | "unknown" | null + steamReviewScore?: number | null + steamReviewSentiment?: string | null + antiCheatRelevant?: boolean + antiCheatStatus?: string | null + antiCheatName?: string | null } function SearchContent() { @@ -476,6 +485,28 @@ function SearchResultCard({ label="Version" value={result.latestVersion ?? "—"} /> + + {/* Playability badge */} + {result.playabilityStatus && ( + + )} + + {/* Anti-cheat badge */} + {result.antiCheatRelevant && result.antiCheatStatus === "unsupported" && ( + + )} + + {/* Steam review score */} + {result.steamReviewScore != null && ( + + {result.steamReviewScore}% positive + + )} diff --git a/lib/api/search-unified.ts b/lib/api/search-unified.ts index e5cf473..c603f0f 100644 --- a/lib/api/search-unified.ts +++ b/lib/api/search-unified.ts @@ -294,6 +294,12 @@ export const searchUnifiedRoutes = new Elysia({ prefix: "/search" }).get( isPoorPerformance: poorPerformerMap.get(g.id) ?? false, bestFps: bestFpsMap.get(g.id) ?? null, latestVersion: latestVersionMap.get(g.id) ?? null, + playabilityStatus: g.playabilityStatus, + steamReviewScore: g.steamReviewScore, + steamReviewSentiment: g.steamReviewSentiment, + antiCheatRelevant: platform?.antiCheatRelevant ?? null, + antiCheatStatus: platform?.antiCheatStatus ?? null, + antiCheatName: platform?.antiCheatName ?? null, }) }