Camera app scan: the first scan only opens the page, joining takes the ring or a second scan read within 4 s of the qr leaving the screen (votes keep 12 s); organizers can turn it off; open vote options and turnout bar stay above the big qr; native scan noted under the check
This commit is contained in:
@@ -4,6 +4,8 @@ const cfg = await api("GET", "/api/config").catch(() => ({}));
|
||||
$("#pw-box").hidden = !cfg.create_password;
|
||||
|
||||
$("#codes-on").addEventListener("change", (e) => { $("#codes-box").hidden = !e.target.checked; });
|
||||
// the classic qr is the camera app code itself
|
||||
$("#code-style").addEventListener("change", (e) => { $("#camera").disabled = e.target.value !== "ring"; });
|
||||
|
||||
$("#form").addEventListener("submit", async (e) => {
|
||||
e.preventDefault();
|
||||
@@ -15,6 +17,7 @@ $("#form").addEventListener("submit", async (e) => {
|
||||
interval_ms: +$("#interval").value,
|
||||
scans_required: +$("#scans").value,
|
||||
code_style: $("#code-style").value,
|
||||
camera_pass: $("#camera").value === "1",
|
||||
expected: $("#expected").value ? +$("#expected").value : null,
|
||||
max_voters: $("#maxv").value ? +$("#maxv").value : null,
|
||||
require_code: $("#codes-on").checked,
|
||||
|
||||
Reference in New Issue
Block a user