Weiter am Taskgame gebastelt
Some checks failed
Host-Based Deploy (Java 21 Fix) / build-and-run (push) Has been cancelled
Some checks failed
Host-Based Deploy (Java 21 Fix) / build-and-run (push) Has been cancelled
This commit is contained in:
@@ -256,9 +256,14 @@
|
||||
</div>
|
||||
|
||||
<div class="checkbox-row" id="rowTestLock">
|
||||
<input type="checkbox" id="testLock">
|
||||
<input type="checkbox" id="testLock" onchange="onTestLockChange()">
|
||||
<label for="testLock">Test-Lock <span class="form-hint">(kein echter Lock, zum Ausprobieren)</span></label>
|
||||
</div>
|
||||
<div id="rowSpeedFactor" style="display:none; align-items:center; gap:12px; padding:6px 0;">
|
||||
<label for="speedFactor" style="white-space:nowrap;">Geschwindigkeit:</label>
|
||||
<input type="range" id="speedFactor" min="1" max="10" value="1" style="flex:1;" oninput="document.getElementById('speedFactorLabel').textContent = '×' + this.value">
|
||||
<span id="speedFactorLabel" style="min-width:32px; text-align:right;">×1</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="error-msg" id="errorMsg"></div>
|
||||
@@ -515,6 +520,7 @@
|
||||
khInput.readOnly = true;
|
||||
khInput.style.opacity = '0.6';
|
||||
document.getElementById('rowTestLock').style.display = 'none';
|
||||
document.getElementById('rowSpeedFactor').style.display = 'none';
|
||||
document.getElementById('rowDetailsVisible').style.display = '';
|
||||
} else {
|
||||
khInput.readOnly = false;
|
||||
@@ -728,6 +734,15 @@
|
||||
el.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
|
||||
function onTestLockChange() {
|
||||
const checked = document.getElementById('testLock').checked;
|
||||
document.getElementById('rowSpeedFactor').style.display = checked ? 'flex' : 'none';
|
||||
if (!checked) {
|
||||
document.getElementById('speedFactor').value = 1;
|
||||
document.getElementById('speedFactorLabel').textContent = '×1';
|
||||
}
|
||||
}
|
||||
|
||||
// ── Absenden ──
|
||||
async function createSession() {
|
||||
document.getElementById('errorMsg').style.display = 'none';
|
||||
@@ -756,6 +771,7 @@
|
||||
const isFriendLockee = lockeeVal && lockeeVal !== myUserId;
|
||||
const unlockCodeLen = isFriendLockee ? null : (parseInt(document.getElementById('unlockCodeLines').value) || 5);
|
||||
const isTestLock = isFriendLockee ? false : document.getElementById('testLock').checked;
|
||||
const speedFactor = isTestLock ? parseInt(document.getElementById('speedFactor').value) : 1;
|
||||
|
||||
let endpoint, body;
|
||||
|
||||
@@ -769,6 +785,7 @@
|
||||
testLock: isTestLock,
|
||||
unlockCodeLength: unlockCodeLen,
|
||||
controllType: selectedLockControl,
|
||||
speedFactor: speedFactor,
|
||||
};
|
||||
} else {
|
||||
// CardLock
|
||||
@@ -798,6 +815,7 @@
|
||||
controllType: selectedLockControl,
|
||||
gameSetId: t.gameSetId || null,
|
||||
gameSpieldauerIdx: t.gameSpieldauerIdx ?? null,
|
||||
speedFactor: speedFactor,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user