Clarifie le libelle du temps de Block en mode Time
This commit is contained in:
7
app.js
7
app.js
@@ -116,6 +116,7 @@ function initSetupPage() {
|
|||||||
const resumeCard = document.querySelector("#resumeCard");
|
const resumeCard = document.querySelector("#resumeCard");
|
||||||
const moveSecondsField = document.querySelector("#moveSecondsField");
|
const moveSecondsField = document.querySelector("#moveSecondsField");
|
||||||
const timeInitialField = document.querySelector("#timeInitialField");
|
const timeInitialField = document.querySelector("#timeInitialField");
|
||||||
|
const blockSecondsLabel = document.querySelector("#blockSecondsLabel");
|
||||||
const moveSecondsInput = form?.querySelector('[name="moveSeconds"]');
|
const moveSecondsInput = form?.querySelector('[name="moveSeconds"]');
|
||||||
const timeInitialInput = form?.querySelector('[name="timeInitialMinutes"]');
|
const timeInitialInput = form?.querySelector('[name="timeInitialMinutes"]');
|
||||||
|
|
||||||
@@ -130,6 +131,7 @@ function initSetupPage() {
|
|||||||
const blockDurationMs = getDurationInputMs(form, "blockSeconds", DEFAULT_BLOCK_DURATION_MS);
|
const blockDurationMs = getDurationInputMs(form, "blockSeconds", DEFAULT_BLOCK_DURATION_MS);
|
||||||
const moveLimitMs = getDurationInputMs(form, "moveSeconds", DEFAULT_MOVE_LIMIT_MS);
|
const moveLimitMs = getDurationInputMs(form, "moveSeconds", DEFAULT_MOVE_LIMIT_MS);
|
||||||
const timeInitialMs = getMinuteInputMs(form, "timeInitialMinutes", TIME_MODE_INITIAL_CLOCK_MS);
|
const timeInitialMs = getMinuteInputMs(form, "timeInitialMinutes", TIME_MODE_INITIAL_CLOCK_MS);
|
||||||
|
const blockLabel = getBlockLabel(mode);
|
||||||
const moveLimitActive = usesMoveLimit(mode);
|
const moveLimitActive = usesMoveLimit(mode);
|
||||||
const timeImpact =
|
const timeImpact =
|
||||||
mode === "time"
|
mode === "time"
|
||||||
@@ -158,6 +160,11 @@ function initSetupPage() {
|
|||||||
timeInitialInput.disabled = moveLimitActive;
|
timeInitialInput.disabled = moveLimitActive;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (blockSecondsLabel instanceof HTMLElement) {
|
||||||
|
blockSecondsLabel.textContent =
|
||||||
|
blockLabel === "Block" ? "Temps du Block (secondes)" : "Temps partie (secondes)";
|
||||||
|
}
|
||||||
|
|
||||||
summary.innerHTML = `
|
summary.innerHTML = `
|
||||||
<strong>${MODES[mode].label}</strong>
|
<strong>${MODES[mode].label}</strong>
|
||||||
<span>${PRESETS[preset].description}</span>
|
<span>${PRESETS[preset].description}</span>
|
||||||
|
|||||||
@@ -122,7 +122,7 @@
|
|||||||
<legend>Temps personnalisés</legend>
|
<legend>Temps personnalisés</legend>
|
||||||
<div class="timing-grid">
|
<div class="timing-grid">
|
||||||
<label class="field">
|
<label class="field">
|
||||||
<span>Temps du Block (secondes)</span>
|
<span id="blockSecondsLabel">Temps partie (secondes)</span>
|
||||||
<input
|
<input
|
||||||
name="blockSeconds"
|
name="blockSeconds"
|
||||||
type="number"
|
type="number"
|
||||||
|
|||||||
Reference in New Issue
Block a user