diff --git a/app.js b/app.js index 310245e..7dc66d7 100644 --- a/app.js +++ b/app.js @@ -121,7 +121,7 @@ function initSetupPage() { const competitionFields = Array.from(document.querySelectorAll("[data-competition-field]")); const moveSecondsField = document.querySelector("#moveSecondsField"); const timeInitialField = document.querySelector("#timeInitialField"); - const blockSecondsLabel = document.querySelector("#blockSecondsLabel"); + const blockDurationLabel = document.querySelector("#blockDurationLabel"); const moveSecondsInput = form?.querySelector('[name="moveSeconds"]'); const timeInitialInput = form?.querySelector('[name="timeInitialMinutes"]'); @@ -171,7 +171,7 @@ function initSetupPage() { const mode = getRadioValue(form, "mode") || "twice"; const preset = getRadioValue(form, "preset") || "fast"; const quota = PRESETS[preset].quota; - const blockDurationMs = getDurationInputMs(form, "blockSeconds", DEFAULT_BLOCK_DURATION_MS); + const blockDurationMs = getMinuteInputMs(form, "blockMinutes", DEFAULT_BLOCK_DURATION_MS); const moveLimitMs = getDurationInputMs(form, "moveSeconds", DEFAULT_MOVE_LIMIT_MS); const timeInitialMs = getMinuteInputMs(form, "timeInitialMinutes", TIME_MODE_INITIAL_CLOCK_MS); const blockLabel = getBlockLabel(mode); @@ -205,9 +205,9 @@ function initSetupPage() { document.body.classList.toggle("time-setup-mode", !moveLimitActive); - if (blockSecondsLabel instanceof HTMLElement) { - blockSecondsLabel.textContent = - blockLabel === "Block" ? "Temps du Block (secondes)" : "Temps partie (secondes)"; + if (blockDurationLabel instanceof HTMLElement) { + blockDurationLabel.textContent = + blockLabel === "Block" ? "Temps du Block (minutes)" : "Temps partie (minutes)"; } syncCompetitionFields(); @@ -299,7 +299,7 @@ function initSetupPage() { competitionMode: isCheckboxChecked(form, "competitionMode"), mode: getRadioValue(form, "mode") || "twice", preset: getRadioValue(form, "preset") || "fast", - blockDurationMs: getDurationInputMs(form, "blockSeconds", DEFAULT_BLOCK_DURATION_MS), + blockDurationMs: getMinuteInputMs(form, "blockMinutes", DEFAULT_BLOCK_DURATION_MS), moveLimitMs: getDurationInputMs(form, "moveSeconds", DEFAULT_MOVE_LIMIT_MS), timeInitialMs: getMinuteInputMs(form, "timeInitialMinutes", TIME_MODE_INITIAL_CLOCK_MS), whiteName: sanitizeText(data.get("whiteName")) || "Blanc", @@ -2032,7 +2032,7 @@ function loadDemo(form, onRender) { setInputValue(form, "matchLabel", "Demo officielle ChessCubing"); setRadioValue(form, "mode", "twice"); setRadioValue(form, "preset", "freeze"); - setInputValue(form, "blockSeconds", "180"); + setInputValue(form, "blockMinutes", "3"); setInputValue(form, "moveSeconds", "20"); setInputValue(form, "timeInitialMinutes", "10"); setInputValue(form, "whiteName", "Nora"); diff --git a/application.html b/application.html index c011339..315cb0e 100644 --- a/application.html +++ b/application.html @@ -169,14 +169,14 @@