This commit is contained in:
2026-10-27 09:38:05 +07:00
parent 1ce8efeef5
commit ccf7240584
8 changed files with 147 additions and 3 deletions
+4 -1
View File
@@ -155,7 +155,10 @@ export class Online {
const status = text(game.status)
if (id !== pkg.package.game.id || !Object.hasOwn(gameStatuses, status))
throw new Error('Сервер вернул неизвестное состояние игры')
this.state.game = { key: pkg.key, id, name: text(game.name), status: status as GameStatus }
this.state.game = {
key: pkg.key, id, name: text(game.name), status: status as GameStatus,
startedAt: text(game.startedAt ?? ''), endedAt: text(game.endedAt ?? ''),
}
this.state.gameError = ''
const listed = this.state.games.find(g => g.id === id)
if (listed) listed.status = status