Clarifie le libelle du temps de Block en mode Time

This commit is contained in:
2026-04-12 19:57:57 +02:00
parent 1f67ba46fb
commit f5570cea25
2 changed files with 8 additions and 1 deletions

7
app.js
View File

@@ -116,6 +116,7 @@ function initSetupPage() {
const resumeCard = document.querySelector("#resumeCard");
const moveSecondsField = document.querySelector("#moveSecondsField");
const timeInitialField = document.querySelector("#timeInitialField");
const blockSecondsLabel = document.querySelector("#blockSecondsLabel");
const moveSecondsInput = form?.querySelector('[name="moveSeconds"]');
const timeInitialInput = form?.querySelector('[name="timeInitialMinutes"]');
@@ -130,6 +131,7 @@ function initSetupPage() {
const blockDurationMs = getDurationInputMs(form, "blockSeconds", 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);
const moveLimitActive = usesMoveLimit(mode);
const timeImpact =
mode === "time"
@@ -158,6 +160,11 @@ function initSetupPage() {
timeInitialInput.disabled = moveLimitActive;
}
if (blockSecondsLabel instanceof HTMLElement) {
blockSecondsLabel.textContent =
blockLabel === "Block" ? "Temps du Block (secondes)" : "Temps partie (secondes)";
}
summary.innerHTML = `
<strong>${MODES[mode].label}</strong>
<span>${PRESETS[preset].description}</span>