feat: update frontend for new upscaler/battery fields

- Replace fsrVersion with upscalerType/upscalerVersion in Preset interface
- Update StatsResponse to use upscalerType/upscalerVersion
- Replace FSR_OPTIONS with UPSCALER_OPTIONS (FSR, DLSS, XeSS, LSFG, Other)
- Update FRAMEGEN_OPTIONS to include LSFG and Other
- Update filter state from fsr to upscaler
- Update isRawPerformerPreset and getFpsColor to use upscalerType
- Update UpscalerBarChart interface and formatCombo function
- Update preset card technology tags to display upscaler version
This commit is contained in:
2026-04-27 07:28:52 +08:00
parent 4943f24fd4
commit ce2ccad578
2 changed files with 51 additions and 22 deletions
+17 -6
View File
@@ -5,17 +5,28 @@ import { EChartWrapper, CHART_THEME, getDeviceColor } from "./EChartWrapper"
import type { EChartsOption } from "echarts"
interface UpscalerStat {
fsrVersion: string
upscalerType: string
upscalerVersion?: string | null
frameGenMethod: string
hardwareSlug: string
avgFps: number
count: number
}
function formatCombo(fsr: string, fg: string): string {
function formatCombo(upscalerType: string, upscalerVersion: string | null | undefined, fg: string): string {
const parts: string[] = []
if (fsr !== "none") parts.push(fsr.toUpperCase())
if (fg !== "none") parts.push(fg === "fsr_fg" ? "FSR FG" : "DLSS FG")
if (upscalerType !== "none") {
const upscalerLabel = upscalerVersion
? `${upscalerType.toUpperCase()} ${upscalerVersion}`
: upscalerType.toUpperCase()
parts.push(upscalerLabel)
}
if (fg !== "none") {
if (fg === "fsr_fg") parts.push("FSR FG")
else if (fg === "dlss_fg") parts.push("DLSS FG")
else if (fg === "lsfg") parts.push("LSFG")
else parts.push(fg.toUpperCase())
}
return parts.length > 0 ? parts.join(" + ") : "Native"
}
@@ -29,7 +40,7 @@ export function UpscalerBarChart({
const option = useMemo<EChartsOption>(() => {
const combos = [
...new Set(
data.map((d) => formatCombo(d.fsrVersion, d.frameGenMethod)),
data.map((d) => formatCombo(d.upscalerType, d.upscalerVersion, d.frameGenMethod)),
),
]
const deviceSlugs = [...new Set(data.map((d) => d.hardwareSlug))]
@@ -40,7 +51,7 @@ export function UpscalerBarChart({
data: combos.map((combo) => {
const match = data.find(
(d) =>
formatCombo(d.fsrVersion, d.frameGenMethod) === combo &&
formatCombo(d.upscalerType, d.upscalerVersion, d.frameGenMethod) === combo &&
d.hardwareSlug === slug,
)
return match?.avgFps ?? 0