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:
@@ -80,6 +80,9 @@ function renderSettings(p) {
|
||||
if (active !== $("#s-code-style")) $("#s-code-style").value = p.code_style;
|
||||
if (active !== $("#s-entry-big")) $("#s-entry-big").value = p.entry_big ? "1" : "0";
|
||||
$("#s-entry-big").disabled = p.code_style !== "ring";
|
||||
if (active !== $("#s-camera")) $("#s-camera").value = p.camera_pass ? "1" : "0";
|
||||
// the classic qr is the camera app code itself
|
||||
$("#s-camera").disabled = p.code_style !== "ring";
|
||||
$("#s-code").checked = p.require_code;
|
||||
$("#access-row").hidden = !p.require_code && !state.codes.access.total;
|
||||
const sum = (c, none) => (c.total ? `${c.used} utilisé${c.used > 1 ? "s" : ""} sur ${c.total}` : none);
|
||||
@@ -239,6 +242,7 @@ const SETTINGS = {
|
||||
"#s-vote-scans": (el) => ({ vote_scans: +el.value }),
|
||||
"#s-code-style": (el) => ({ code_style: el.value }),
|
||||
"#s-entry-big": (el) => ({ entry_big: el.value === "1" }),
|
||||
"#s-camera": (el) => ({ camera_pass: el.value === "1" }),
|
||||
};
|
||||
for (const [sel, build] of Object.entries(SETTINGS)) {
|
||||
$(sel).addEventListener("change", async (e) => {
|
||||
|
||||
Reference in New Issue
Block a user