diff --git a/components/wizard/game-entry-wizard.tsx b/components/wizard/game-entry-wizard.tsx index 4db9d7d..c0ffc92 100644 --- a/components/wizard/game-entry-wizard.tsx +++ b/components/wizard/game-entry-wizard.tsx @@ -43,7 +43,7 @@ export function GameEntryWizard({ gameId, gameVersionId }: GameEntryWizardProps) // Step 4: Environment const [environment, setEnvironment] = useState({ - fsrVersion: "none", + upscalerType: "none", frameGenMethod: "none", }) @@ -122,9 +122,12 @@ export function GameEntryWizard({ gameId, gameVersionId }: GameEntryWizardProps) loadTimeSd: performance.loadTimeSd !== undefined ? Number(performance.loadTimeSd) : null, protonVersion: environment.protonVersion || null, osVersion: environment.osVersion || null, - fsrVersion: environment.fsrVersion ?? "none", + upscalerType: environment.upscalerType ?? "none", + upscalerVersion: environment.upscalerVersion || null, frameGenMethod: environment.frameGenMethod ?? "none", launchOptions: environment.launchOptions || null, + estimatedBatteryMin: environment.estimatedBatteryMin ?? null, + customSystem: environment.customSystem ?? false, settingsJson: settingsJson.length > 0 ? settingsJson : null, userNotes: userNotes || null, }), diff --git a/components/wizard/steps/environment-step.tsx b/components/wizard/steps/environment-step.tsx index 9cc9530..4b2b89d 100644 --- a/components/wizard/steps/environment-step.tsx +++ b/components/wizard/steps/environment-step.tsx @@ -2,28 +2,35 @@ import { useEffect, useRef, useState, useCallback } from "react" import { motion, AnimatePresence } from "motion/react" -import { Terminal, ChevronDown, Loader2 } from "lucide-react" +import { Terminal, ChevronDown, Loader2, ToggleLeft, ToggleRight } from "lucide-react" import { api } from "@/lib/eden" -const FSR_OPTIONS = [ +export const UPSCALER_TYPE_OPTIONS = [ { value: "none", label: "None" }, - { value: "fsr1", label: "FSR 1" }, - { value: "fsr2", label: "FSR 2" }, - { value: "fsr3", label: "FSR 3" }, + { value: "fsr", label: "AMD FSR" }, + { value: "dlss", label: "NVIDIA DLSS" }, + { value: "xess", label: "Intel XeSS" }, + { value: "lsfg", label: "Lossless Scaling FG" }, + { value: "other", label: "Other" }, ] as const -const FRAME_GEN_OPTIONS = [ +export const FRAME_GEN_OPTIONS = [ { value: "none", label: "None" }, { value: "fsr_fg", label: "FSR Frame Generation" }, { value: "dlss_fg", label: "DLSS Frame Generation" }, + { value: "lsfg", label: "Lossless Scaling FG" }, + { value: "other", label: "Other" }, ] as const export interface EnvironmentData { protonVersion?: string osVersion?: string - fsrVersion?: string + upscalerType?: string + upscalerVersion?: string frameGenMethod?: string launchOptions?: string + estimatedBatteryMin?: number + customSystem?: boolean } interface EnvironmentStepProps { @@ -184,14 +191,14 @@ export function EnvironmentStep({ value, onChange }: EnvironmentStepProps) {
- +
update("upscalerVersion", e.target.value)} + placeholder="e.g. 3.1" + 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" + /> +
+ )} +
+ +
@@ -233,6 +255,57 @@ export function EnvironmentStep({ value, onChange }: EnvironmentStepProps) { Steam launch options or environment variables used.

+ +
+
+ + { + 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" + /> +

+ Approximate battery life in minutes while playing this game. +

+
+ +
+ +
+ + + Check if using custom firmware, OS, or mods that affect performance. + +
+
+
) } diff --git a/components/wizard/steps/review-step.tsx b/components/wizard/steps/review-step.tsx index 211d8c4..f7048cc 100644 --- a/components/wizard/steps/review-step.tsx +++ b/components/wizard/steps/review-step.tsx @@ -6,6 +6,7 @@ import { TiptapEditor } from "@/components/tiptap-editor" import type { SettingCategory } from "@/components/wizard/settings-editor" import type { PerformanceData } from "./performance-step" import type { EnvironmentData } from "./environment-step" +import { UPSCALER_TYPE_OPTIONS, FRAME_GEN_OPTIONS } from "./environment-step" export interface ReviewData { hardwareSlug: string @@ -57,25 +58,18 @@ export function ReviewStep({ }: ReviewStepProps) { const { hardwareName, performance, environment, settings } = data - const fsrLabel = - environment.fsrVersion === "none" - ? "None" - : environment.fsrVersion === "fsr1" - ? "FSR 1" - : environment.fsrVersion === "fsr2" - ? "FSR 2" - : environment.fsrVersion === "fsr3" - ? "FSR 3" - : "Not set" + const upscalerLabel = (() => { + if (!data.environment.upscalerType || data.environment.upscalerType === "none") return "None" + const opt = UPSCALER_TYPE_OPTIONS.find(o => o.value === data.environment.upscalerType) + const base = opt?.label ?? data.environment.upscalerType + return data.environment.upscalerVersion ? `${base} ${data.environment.upscalerVersion}` : base + })() - const frameGenLabel = - environment.frameGenMethod === "none" - ? "None" - : environment.frameGenMethod === "fsr_fg" - ? "FSR Frame Generation" - : environment.frameGenMethod === "dlss_fg" - ? "DLSS Frame Generation" - : "Not set" + const frameGenLabel = (() => { + if (!environment.frameGenMethod || environment.frameGenMethod === "none") return "None" + const opt = FRAME_GEN_OPTIONS.find(o => o.value === environment.frameGenMethod) + return opt?.label ?? environment.frameGenMethod + })() return (
@@ -112,8 +106,10 @@ export function ReviewStep({ - + + + {environment.launchOptions && (