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:
2026-11-16 13:26:46 +01:00
parent 74c9b34ec1
commit e328a0983f
16 changed files with 351 additions and 226 deletions
+18
View File
@@ -146,6 +146,24 @@ export function toast(msg, kind = "info") {
const SVGNS = "http://www.w3.org/2000/svg";
const ICONS = {
screen: ["M3 5h18v11H3z", "M8 20h8", "M12 16v4"],
check: ["M5 12.5l4.5 4.5L19 7.5"],
};
export function icon(name, size = 16) {
const svg = document.createElementNS(SVGNS, "svg");
for (const [k, v] of Object.entries({ viewBox: "0 0 24 24", width: size, height: size, fill: "none",
stroke: "currentColor", "stroke-width": 2, "stroke-linecap": "round", "stroke-linejoin": "round",
class: "icon", "aria-hidden": "true" })) svg.setAttribute(k, v);
for (const d of ICONS[name]) {
const p = document.createElementNS(SVGNS, "path");
p.setAttribute("d", d);
svg.append(p);
}
return svg;
}
// segmented ring: n of total segments lit, the newest one in highlighter yellow
export function ring(n, total, size = 160, label = `${n}/${total}`) {
const svg = document.createElementNS(SVGNS, "svg");