tauri-app: fix end-of-game stats reading, pass raw json file to front
All checks were successful
record-daemon / Build, check and test (push) Successful in 2m6s

This commit is contained in:
2026-03-26 23:42:31 +01:00
parent 0871703b11
commit b09f669e73
3 changed files with 30 additions and 180 deletions

View File

@@ -53,9 +53,9 @@ function closeDetail() {
function getLocalPlayer(stats: RawEndGameStats | null): EndGamePlayer | null {
if (!stats) return null;
// Try local_player field first
if (stats.local_player) {
return stats.local_player;
// Try localPlayer field first (camelCase from API)
if (stats.localPlayer) {
return stats.localPlayer;
}
// Try teams
@@ -63,7 +63,7 @@ function getLocalPlayer(stats: RawEndGameStats | null): EndGamePlayer | null {
for (const team of stats.teams) {
if (team.players) {
for (const player of team.players) {
if (player.is_local_player) {
if (player.isLocalPlayer) {
return player;
}
}