feat: remove estimatedBatteryMin references from 11 files (Tasks 3.1-3.14)

This commit is contained in:
2026-05-10 05:07:25 +08:00
parent aa4509ede8
commit 6d906f0bbf
11 changed files with 1 additions and 42 deletions
@@ -33,7 +33,6 @@ interface PerformanceEntry {
launchOptions: string | null launchOptions: string | null
settingsJson: string | null settingsJson: string | null
userNotes: string | null userNotes: string | null
estimatedBatteryMin: number | null
customSystem: string | null customSystem: string | null
isRemoved: boolean isRemoved: boolean
removedReason: string | null removedReason: string | null
-2
View File
@@ -137,7 +137,6 @@ interface Preset {
launchOptions: string | null launchOptions: string | null
loadTimeSsd: number | null loadTimeSsd: number | null
loadTimeSd: number | null loadTimeSd: number | null
estimatedBatteryMin: number | null
tdpWatts: number | null tdpWatts: number | null
youtubeVideoId: string | null youtubeVideoId: string | null
screenshots: Array<{ screenshots: Array<{
@@ -233,7 +232,6 @@ interface StatsResponse {
id: string id: string
hardwareSlug: string hardwareSlug: string
tdpWatts: number tdpWatts: number
estimatedBatteryMin: number
estimatedBatteryHours: number estimatedBatteryHours: number
wattHours: number | null wattHours: number | null
tdpMax: number | null tdpMax: number | null
-2
View File
@@ -178,7 +178,6 @@ export default async function GamePage({
launchOptions: performanceEntries.launchOptions, launchOptions: performanceEntries.launchOptions,
loadTimeSsd: performanceEntries.loadTimeSsd, loadTimeSsd: performanceEntries.loadTimeSsd,
loadTimeSd: performanceEntries.loadTimeSd, loadTimeSd: performanceEntries.loadTimeSd,
estimatedBatteryMin: performanceEntries.estimatedBatteryMin,
tdpWatts: performanceEntries.tdpWatts, tdpWatts: performanceEntries.tdpWatts,
youtubeVideoId: performanceEntries.youtubeVideoId, youtubeVideoId: performanceEntries.youtubeVideoId,
customSystem: performanceEntries.customSystem, customSystem: performanceEntries.customSystem,
@@ -281,7 +280,6 @@ export default async function GamePage({
launchOptions: p.launchOptions, launchOptions: p.launchOptions,
loadTimeSsd: p.loadTimeSsd ?? null, loadTimeSsd: p.loadTimeSsd ?? null,
loadTimeSd: p.loadTimeSd ?? null, loadTimeSd: p.loadTimeSd ?? null,
estimatedBatteryMin: p.estimatedBatteryMin ?? null,
tdpWatts: p.tdpWatts ?? null, tdpWatts: p.tdpWatts ?? null,
youtubeVideoId: p.youtubeVideoId ?? null, youtubeVideoId: p.youtubeVideoId ?? null,
screenshots: null as Array<{ id: string; url: string; width: number; height: number; orderIndex: number }> | null, screenshots: null as Array<{ id: string; url: string; width: number; height: number; orderIndex: number }> | null,
+1 -4
View File
@@ -42,7 +42,6 @@ interface Preset {
launchOptions: string | null launchOptions: string | null
loadTimeSsd: number | null loadTimeSsd: number | null
loadTimeSd: number | null loadTimeSd: number | null
estimatedBatteryMin: number | null
tdpWatts: number | null tdpWatts: number | null
youtubeVideoId: string | null youtubeVideoId: string | null
screenshots: Array<{ id: string; url: string; width: number; height: number }> | null screenshots: Array<{ id: string; url: string; width: number; height: number }> | null
@@ -535,9 +534,7 @@ export function PresetDetailModal({
{preset.loadTimeSd !== null && ( {preset.loadTimeSd !== null && (
<MetaItem label="Load Time (SD)" value={`${preset.loadTimeSd}s`} /> <MetaItem label="Load Time (SD)" value={`${preset.loadTimeSd}s`} />
)} )}
{preset.estimatedBatteryMin !== null && (
<MetaItem label="Battery Life" value={`${preset.estimatedBatteryMin} min`} />
)}
{preset.customSystem && ( {preset.customSystem && (
<MetaItem label="Custom System" value="Yes" /> <MetaItem label="Custom System" value="Yes" />
)} )}
-1
View File
@@ -6,7 +6,6 @@ interface BatteryLifePoint {
id: string id: string
hardwareSlug: string hardwareSlug: string
tdpWatts: number tdpWatts: number
estimatedBatteryMin: number
estimatedBatteryHours: number estimatedBatteryHours: number
wattHours: number | null wattHours: number | null
tdpMax: number | null tdpMax: number | null
-2
View File
@@ -117,7 +117,6 @@ export function GameEntryWizard({ gameId, gameVersions, defaultVersionId, editEn
upscalerVersion: editEntry.upscalerVersion ?? undefined, upscalerVersion: editEntry.upscalerVersion ?? undefined,
frameGenMethod: editEntry.frameGenMethod ?? "none", frameGenMethod: editEntry.frameGenMethod ?? "none",
launchOptions: editEntry.launchOptions ?? undefined, launchOptions: editEntry.launchOptions ?? undefined,
estimatedBatteryMin: editEntry.estimatedBatteryMin ?? undefined,
customSystem: editEntry.customSystem ?? false, customSystem: editEntry.customSystem ?? false,
youtubeVideoId: editEntry.youtubeVideoId ?? undefined, youtubeVideoId: editEntry.youtubeVideoId ?? undefined,
} }
@@ -272,7 +271,6 @@ export function GameEntryWizard({ gameId, gameVersions, defaultVersionId, editEn
upscalerVersion: environment.upscalerVersion || null, upscalerVersion: environment.upscalerVersion || null,
frameGenMethod: environment.frameGenMethod ?? "none", frameGenMethod: environment.frameGenMethod ?? "none",
launchOptions: environment.launchOptions || null, launchOptions: environment.launchOptions || null,
estimatedBatteryMin: environment.estimatedBatteryMin ?? null,
customSystem: environment.customSystem ?? false, customSystem: environment.customSystem ?? false,
settingsJson: settingsJson.length > 0 ? settingsJson : null, settingsJson: settingsJson.length > 0 ? settingsJson : null,
userNotes: userNotes || null, userNotes: userNotes || null,
@@ -29,7 +29,6 @@ export interface EnvironmentData {
upscalerVersion?: string upscalerVersion?: string
frameGenMethod?: string frameGenMethod?: string
launchOptions?: string launchOptions?: string
estimatedBatteryMin?: number
customSystem?: boolean customSystem?: boolean
youtubeVideoId?: string // NEW youtubeVideoId?: string // NEW
} }
@@ -259,30 +258,6 @@ export function EnvironmentStep({ value, onChange }: EnvironmentStepProps) {
</div> </div>
<div className="grid grid-cols-1 sm:grid-cols-2 gap-3 pt-2"> <div className="grid grid-cols-1 sm:grid-cols-2 gap-3 pt-2">
<div className="space-y-1.5">
<label className="text-xs font-medium text-text/60">
Estimated Battery Life (minutes)
</label>
<input
type="number"
min={1}
step={1}
value={value.estimatedBatteryMin ?? ""}
onChange={(e) => {
const val = e.target.value
onChange({
...value,
estimatedBatteryMin: val === "" ? undefined : Number(val),
})
}}
placeholder="e.g. 90"
className="w-full px-4 py-3 rounded-lg border border-border bg-text/5 text-text text-sm placeholder:text-text/40 outline-none focus:border-primary focus:ring-2 focus:ring-primary/50 transition-colors"
/>
<p className="text-xs text-text/40">
Approximate battery life in minutes while playing this game.
</p>
</div>
<div className="space-y-1.5"> <div className="space-y-1.5">
<label className="text-xs font-medium text-text/60"> <label className="text-xs font-medium text-text/60">
Custom / Modified System Custom / Modified System
-1
View File
@@ -153,7 +153,6 @@ export function ReviewStep({
<SummaryRow label="OS Version" value={environment.osVersion || "Not set"} /> <SummaryRow label="OS Version" value={environment.osVersion || "Not set"} />
<SummaryRow label="Upscaler" value={upscalerLabel} /> <SummaryRow label="Upscaler" value={upscalerLabel} />
<SummaryRow label="Frame Gen" value={frameGenLabel} /> <SummaryRow label="Frame Gen" value={frameGenLabel} />
<SummaryRow label="Estimated Battery" value={environment.estimatedBatteryMin ? `${environment.estimatedBatteryMin} min` : "Not set"} />
<SummaryRow label="Custom System" value={environment.customSystem ? "Yes" : "No"} /> <SummaryRow label="Custom System" value={environment.customSystem ? "Yes" : "No"} />
{environment.launchOptions && ( {environment.launchOptions && (
<SummaryRow <SummaryRow
-1
View File
@@ -74,7 +74,6 @@ export const adminPerformanceRoutes = new Elysia({ prefix: "/admin" })
launchOptions: performanceEntries.launchOptions, launchOptions: performanceEntries.launchOptions,
settingsJson: performanceEntries.settingsJson, settingsJson: performanceEntries.settingsJson,
userNotes: performanceEntries.userNotes, userNotes: performanceEntries.userNotes,
estimatedBatteryMin: performanceEntries.estimatedBatteryMin,
customSystem: performanceEntries.customSystem, customSystem: performanceEntries.customSystem,
isRemoved: performanceEntries.isRemoved, isRemoved: performanceEntries.isRemoved,
removedReason: performanceEntries.removedReason, removedReason: performanceEntries.removedReason,
-1
View File
@@ -169,7 +169,6 @@ export const compareRoutes = new Elysia({ prefix: "/compare" })
osVersion: performanceEntries.osVersion, osVersion: performanceEntries.osVersion,
loadTimeSsd: performanceEntries.loadTimeSsd, loadTimeSsd: performanceEntries.loadTimeSsd,
loadTimeSd: performanceEntries.loadTimeSd, loadTimeSd: performanceEntries.loadTimeSd,
estimatedBatteryMin: performanceEntries.estimatedBatteryMin,
settingsJson: performanceEntries.settingsJson, settingsJson: performanceEntries.settingsJson,
launchOptions: performanceEntries.launchOptions, launchOptions: performanceEntries.launchOptions,
hardwareSlug: performanceEntries.hardwareSlug, hardwareSlug: performanceEntries.hardwareSlug,
-2
View File
@@ -125,7 +125,6 @@ export const performanceSubmitRoutes = new Elysia({ prefix: "/performance" })
osVersion: body.osVersion ?? null, osVersion: body.osVersion ?? null,
upscalerType: body.upscalerType ?? "none", upscalerType: body.upscalerType ?? "none",
upscalerVersion: body.upscalerVersion ?? null, upscalerVersion: body.upscalerVersion ?? null,
estimatedBatteryMin: body.estimatedBatteryMin ?? null,
customSystem: body.customSystem ?? false, customSystem: body.customSystem ?? false,
frameGenMethod: body.frameGenMethod ?? "none", frameGenMethod: body.frameGenMethod ?? "none",
loadTimeSsd: body.loadTimeSsd ?? null, loadTimeSsd: body.loadTimeSsd ?? null,
@@ -209,7 +208,6 @@ export const performanceSubmitRoutes = new Elysia({ prefix: "/performance" })
]), ]),
), ),
upscalerVersion: t.Optional(t.Union([t.String(), t.Null()])), upscalerVersion: t.Optional(t.Union([t.String(), t.Null()])),
estimatedBatteryMin: t.Optional(t.Union([t.Number(), t.Null()])),
customSystem: t.Optional(t.Boolean()), customSystem: t.Optional(t.Boolean()),
frameGenMethod: t.Optional( frameGenMethod: t.Optional(
t.Union([ t.Union([