апдейт удалений

This commit is contained in:
2026-09-28 14:51:33 +03:00
parent 399fa226e9
commit 9e52ca1d0e
2 changed files with 36030 additions and 39439 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -7932,9 +7932,10 @@ function openTimerQuickEditor(focusActionId = "") {
const event = board.penalties.find((item) => item.id === eventId);
if (!event) return false;
const now = performance.now();
const wasStartedOnce = Boolean(event.startedOnce || event.running);
if (command === "toggle") {
return controlHockeyPenalty(component, eventId, event.running ? "pause" : "start", rawValue);
return controlHockeyPenalty(component, eventId, event.running ? "pause" : "start", rawValue, options);
}
if (command === "start") {
@@ -8055,11 +8056,16 @@ function openTimerQuickEditor(focusActionId = "") {
refreshHockeyBoardNodes(component);
if (options.syncVmix !== false && ["start", "pause", "reset", "set_time"].includes(command)) {
activateConfiguredPenaltyCountdowns();
// A prepared penalty can already own a stopped vMix target before its first
// Start. Treat that first Start as an explicit seed, not as Resume, otherwise
// only StartCountdown is sent and vMix may run an old/empty native position.
const explicitCountdownSeed = ["reset", "set_time"].includes(command)
|| (command === "start" && !wasStartedOnce);
rebalanceVmixPenaltyTargets({
force: false,
hideUnused: true,
preservePausedCountdown: command === "pause",
editedEventKey: ["reset", "set_time"].includes(command) ? penaltyMirrorKey(component, event) : "",
editedEventKey: explicitCountdownSeed ? penaltyMirrorKey(component, event) : "",
}).catch((error) => console.error("Penalty countdown state sync error", error));
}
return true;
@@ -13455,7 +13461,7 @@ function renderHockeyPenaltyDashboard(node, component, runtime) {
}
async function hockeyPersistGameTimers(gameId, { keepalive = false, force = false } = {}) {
if (!hockeyCanControl() || window.HockeyMatchAccess?.isPeriodPending?.()) return false;
if (!hockeyCanControl()) return false;
gameId = String(gameId || "").trim();
if (!gameId || (state.hockeyTimerHydrating && !force)) return null;
if (state.hockeyTimerSaveTimer) {
@@ -13495,7 +13501,12 @@ function renderHockeyPenaltyDashboard(node, component, runtime) {
}
function hockeyScheduleTimerSave(force = false) {
if (!hockeyCanControl() || window.HockeyMatchAccess?.isPeriodPending?.()) return false;
if (!hockeyCanControl()) return false;
// Do not drop timer/penalty state while a period mutation is queued.
// match-access.js serializes all control mutations and adds the current
// revision when each queued request actually runs, so this save is safe to
// queue behind /control/period. Dropping it here loses startedOnce/running,
// which also prevents the server strength recalculation and vMix Mapping.
if (state.hockeyTimerHydrating) return;
const gameId = hockeyTimerSelectedGameId();
if (!gameId) return;