fix(session): reset lobby when player leaves finished match

This commit is contained in:
2026-09-13 23:14:09 +03:00
parent b6d484dbc9
commit 8ad856b931
10 changed files with 146 additions and 38 deletions
+2 -2
View File
@@ -497,9 +497,9 @@
closeSettings(false);
const phase = state.snapshot ? state.snapshot.phase : state.lobby && state.lobby.phase;
const endsMatch = state.session && state.session.role === "player" &&
["countdown", "active", "finish_pending", "paused"].includes(phase);
["countdown", "active", "finish_pending", "paused", "finished"].includes(phase);
byId("leave-text").textContent = endsMatch
? "Текущая гонка закончится для всех, а ваш слот сразу освободится."
? "Все вернутся в лобби, а ваш слот сразу освободится."
: "Освободим только ваше место в игре.";
byId("leave-confirmation").hidden = false;
byId("leave-accept").focus();