Use seconds instead of miliseconds

This commit is contained in:
nemunaire 2022-09-01 19:13:55 +02:00
parent 48a7ccc979
commit 99441d54f3
1 changed files with 4 additions and 4 deletions

View File

@ -43,7 +43,7 @@
let wsstats = null;
let current_question = null;
let responses = {};
let timer = 20000;
let timer = 20;
let timer_end = null;
let timer_remain = 0;
let timer_cancel = null;
@ -216,7 +216,7 @@
disabled
value={timer_remain}
>
<span class="input-group-text">ms</span>
<span class="input-group-text">s</span>
</div>
{:else}
<div class="input-group input-group-sm float-end" style="max-width: 150px;">
@ -226,7 +226,7 @@
bind:value={timer}
placeholder="Valeur du timer"
>
<span class="input-group-text">ms</span>
<span class="input-group-text">s</span>
</div>
{/if}
<button
@ -287,7 +287,7 @@
type="button"
class="btn btn-sm btn-danger"
disabled={question.id === current_question || !ws_up}
on:click={() => { ws.send('{"action":"new_question", "timer": ' + timer + ',"question":' + question.id + '}')} }
on:click={() => { ws.send('{"action":"new_question", "corrected": ' + corrected + ', "timer": ' + timer * 1000 + ',"question":' + question.id + '}')} }
>
<i class="bi bi-stopwatch-fill"></i>
</button>