@@ -323,14 +351,9 @@ export function PresetDetailModal({
) : (
-
- Are you sure?
-
+
Are you sure?
-
{session && !hasReported && (
<>
{!showReportForm ? (
@@ -378,31 +398,17 @@ export function PresetDetailModal({
- {/* FPS */}
- {preset.fpsAvg !== null && (
-
-
- Avg FPS
+ {/* Performance group */}
+ {hasPerformanceData(preset) && (
+
+
+ Performance
-
-
- {preset.fpsAvg}
-
- {preset.fpsLow !== null && preset.fpsHigh !== null && (
-
- ({Math.round(preset.fpsLow)}–{Math.round(preset.fpsHigh)})
-
+
+ {preset.fpsAvg !== null && (
+
+ {preset.fpsAvg}
+ {preset.fpsLow !== null && preset.fpsHigh !== null && (
+
+ ({Math.round(preset.fpsLow)}–{Math.round(preset.fpsHigh)})
+
+ )}
+ >
+ }
+ />
+ )}
+ {preset.fpsOnePercentLow !== null && (
+
+ )}
+ {preset.loadTimeSsd !== null && (
+
+ )}
+ {preset.loadTimeSd !== null && (
+
)}
)}
- {preset.fpsOnePercentLow !== null && (
-
-
1% Low FPS
-
- {preset.fpsOnePercentLow} fps
+
+ {/* Hardware & Power group */}
+ {hasHardwarePowerData(preset) && (
+
+
+ Hardware & Power
+
+ {preset.tdpWatts !== null && (
+
+ )}
+ {preset.hardwareWattHours !== null && preset.hardwareDeviceType === "handheld" && (
+
+ )}
+ {preset.tdpWatts !== null && preset.hardwareWattHours !== null && preset.hardwareDeviceType === "handheld" && (
+
+ )}
+
)}
-
+ {/* Software group */}
+ {hasSoftwareData(preset) && (
+
+
+ Software
+
+
+
+
+
+
+
+ {preset.customSystem && }
+
+
+ )}
- {/* Metadata */}
-
- {preset.versionString && (
-
- )}
- {preset.buildId && (
-
- )}
- {preset.gameAntiCheatName && (
-
- )}
-
-
- {preset.tdpWatts !== null && (
-
- )}
- {preset.hardwareWattHours !== null && preset.hardwareDeviceType === "handheld" && (
-
- )}
- {preset.tdpWatts !== null && preset.hardwareWattHours !== null && preset.hardwareDeviceType === "handheld" && (
-
- )}
-
-
-
- {preset.loadTimeSsd !== null && (
-
- )}
- {preset.loadTimeSd !== null && (
-
- )}
-
- {preset.customSystem && (
-
- )}
-
-
-
-
- {/* Screenshots */}
- {preset.screenshots && preset.screenshots.length > 0 && (
-
-
Screenshots
-
- {preset.screenshots.map((ss) => (
-
-
-
- ))}
+ {/* Game Info group */}
+ {hasGameInfoData(preset) && (
+
+
+ Game Info
+
+
+ {preset.versionString && (
+
+ )}
+ {preset.buildId && (
+
+ )}
+ {preset.gameAntiCheatName && (
+
+ )}
+
-
)}
- {/* Right panel */}
-
- {/* YouTube Video */}
- {preset.youtubeVideoId && (
-
- )}
-
- {hasCategories ? (
-
-
+ {/* Desktop tab bar */}
+
+ {["media", "settings", ...(preset.userNotes ? ["notes" as TabKey] : [])].map((tab) => (
+
setActiveTab(tab as TabKey)}
+ className={`px-4 py-2.5 text-sm font-medium transition-colors capitalize cursor-pointer ${
+ activeTab === tab
+ ? "text-primary border-b-2 border-primary"
+ : "text-text/50 hover:text-text/70"
+ }`}
>
- {/* Category navigation */}
-
-
-
-
-
- {currentCategory?.category}{" "}
-
- ({activeCategoryIndex + 1}/{categories.length})
-
-
-
-
-
-
+ {tab}
+
+ ))}
+
- {/* Settings table */}
-
-
-
-
- |
- Setting
- |
-
- Value
- |
-
-
-
- {currentCategory?.settings.map((setting, sIdx) => (
-
+ {/* Media tab */}
+ {activeTab === "media" && (
+
+ {/* YouTube Video */}
+ {preset.youtubeVideoId && (
+
+ )}
+
+ {/* Screenshots */}
+ {preset.screenshots && preset.screenshots.length > 0 && (
+
+
Screenshots
+
+ {preset.screenshots.map((ss, i) => (
+ {
+ setLightboxIndex(i)
+ setLightboxOpen(true)
+ }}
+ className="block cursor-pointer focus:outline-none focus:ring-2 focus:ring-primary/50 rounded-lg overflow-hidden"
+ aria-label={`View screenshot ${i + 1}`}
>
- |
- {setting.title}
- |
-
- {formatValue(setting.value)}
- |
-
+ {/* eslint-disable-next-line @next/next/no-img-element */}
+
+
))}
-
-
-
-
-
- ) : (
-
- )}
+
+
+ )}
- {/* Notes */}
- {preset.userNotes && (
-
-
- Notes
-
+ {!preset.youtubeVideoId && (!preset.screenshots || preset.screenshots.length === 0) && (
+
+ )}
+
+ )}
+
+ {/* Settings tab */}
+ {activeTab === "settings" && (
+ <>
+ {hasCategories ? (
+
+
+ {/* Category navigation */}
+
+
+
+
+
+ {currentCategory?.category}{" "}
+
+ ({activeCategoryIndex + 1}/{categories.length})
+
+
+
+
+
+
+
+ {/* Settings table */}
+
+
+
+
+ |
+ Setting
+ |
+
+ Value
+ |
+
+
+
+ {currentCategory?.settings.map((setting, sIdx) => (
+
+ |
+ {setting.title}
+ |
+
+ {formatValue(setting.value)}
+ |
+
+ ))}
+
+
+
+
+
+ ) : (
+
+ )}
+ >
+ )}
+
+ {/* Notes tab */}
+ {activeTab === "notes" && preset.userNotes && (
-
- )}
+ )}
+