fix: suggest edit only for non-Steam games, improve preset modal, improve steam reviews error handling, update changelog

This commit is contained in:
2026-04-30 21:55:38 +08:00
parent 2286f0793c
commit 976b918397
4 changed files with 132 additions and 34 deletions
+18 -11
View File
@@ -101,6 +101,7 @@ interface PlatformSupport {
interface Preset {
id: string
gameId?: string
hardwareSlug: string
hardwareName: string
upvotes: number
@@ -117,6 +118,10 @@ interface Preset {
protonVersion: string | null
osVersion: string | null
launchOptions: string | null
loadTimeSsd: number | null
loadTimeSd: number | null
estimatedBatteryMin: number | null
customSystem: boolean
userNotes: string | null
userId: string
userName: string | null
@@ -638,17 +643,19 @@ export function GamePageClient({
Add Benchmark
</Link>
)}
<CommunitySuggestionForm
gameId={game.id}
gameTitle={game.title}
editableFields={[
{ name: "title", label: "Title", currentValue: game.title },
{ name: "description", label: "Description", currentValue: game.description || "" },
{ name: "developer", label: "Developer", currentValue: game.developer || "" },
{ name: "publisher", label: "Publisher", currentValue: game.publisher || "" },
{ name: "storeUrl", label: "Store URL", currentValue: game.storeUrl || "" },
]}
/>
{game.source !== "steam" && (
<CommunitySuggestionForm
gameId={game.id}
gameTitle={game.title}
editableFields={[
{ name: "title", label: "Title", currentValue: game.title },
{ name: "description", label: "Description", currentValue: game.description || "" },
{ name: "developer", label: "Developer", currentValue: game.developer || "" },
{ name: "publisher", label: "Publisher", currentValue: game.publisher || "" },
{ name: "storeUrl", label: "Store URL", currentValue: game.storeUrl || "" },
]}
/>
)}
</div>
)}
</div>
+16
View File
@@ -40,6 +40,10 @@ interface Preset {
protonVersion: string | null
osVersion: string | null
launchOptions: string | null
loadTimeSsd: number | null
loadTimeSd: number | null
estimatedBatteryMin: number | null
customSystem: boolean
userNotes: string | null
userId: string
userName: string | null
@@ -346,6 +350,18 @@ export function PresetDetailModal({
}
/>
<MetaItem label="Launch Options" value={preset.launchOptions} />
{preset.loadTimeSsd !== null && (
<MetaItem label="Load Time (SSD)" value={`${preset.loadTimeSsd}s`} />
)}
{preset.loadTimeSd !== null && (
<MetaItem label="Load Time (SD)" value={`${preset.loadTimeSd}s`} />
)}
{preset.estimatedBatteryMin !== null && (
<MetaItem label="Battery Life" value={`${preset.estimatedBatteryMin} min`} />
)}
{preset.customSystem && (
<MetaItem label="Custom System" value="Yes" />
)}
</div>
<div className="h-px bg-border" />