Admin: tabs, question composer dialog, settings autosave
Default answers Pour/Contre/Abstention/NPPPAV, svg icons instead of status dots, no live/open status labels, inclusive wording across the UI and docs.
This commit is contained in:
+5
-7
@@ -22,11 +22,8 @@ function render() {
|
||||
document.title = st.title;
|
||||
$("#voters").textContent = st.voters;
|
||||
$("#voters-label").textContent =
|
||||
`inscrit${st.voters > 1 ? "s" : ""}` + (st.expected ? ` / ${st.expected}` : "");
|
||||
`inscription${st.voters > 1 ? "s" : ""}` + (st.expected ? ` sur ${st.expected}` : "");
|
||||
$("#secs").textContent = Math.ceil((st.scans_required * st.interval_ms) / 1000);
|
||||
const b = $("#enroll-badge");
|
||||
b.className = `badge ${st.enrollment_open ? "open" : "closed"}`;
|
||||
b.textContent = st.enrollment_open ? "Inscriptions ouvertes" : "Inscriptions closes";
|
||||
|
||||
const f = st.focus;
|
||||
const box = $("#focus");
|
||||
@@ -43,7 +40,7 @@ function render() {
|
||||
} else if (f.results) {
|
||||
box.append(resultsView(f));
|
||||
} else {
|
||||
box.append(h("p", { class: "status" }, `Vote clos, ${f.participants} votant${f.participants > 1 ? "s" : ""}`));
|
||||
box.append(h("p", { class: "status" }, `Vote clos, ${f.participants} vote${f.participants > 1 ? "s" : ""}`));
|
||||
}
|
||||
}
|
||||
layout();
|
||||
@@ -99,8 +96,9 @@ liveSocket(`/ws/${pid}/screen`, {
|
||||
$("#denied").hidden = false;
|
||||
return;
|
||||
}
|
||||
c.className = `conn ${s}`;
|
||||
c.textContent = s === "online" ? "en direct" : "reconnexion…";
|
||||
c.hidden = s === "online";
|
||||
c.className = "conn offline";
|
||||
c.textContent = "Reconnexion…";
|
||||
if (s !== "online") { qr = null; const cv = $("#qr"); cv.getContext("2d").clearRect(0, 0, cv.width, cv.height); }
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user