Add multilingual support, competition close/reopen, and backup directory
This commit is contained in:
+13
-1
@@ -199,8 +199,20 @@
|
||||
el("h2", null, c.name),
|
||||
el("div", { class: "muted", style: { marginBottom: "0.5rem" } },
|
||||
el("span", { class: "badge accent" }, t(c.role)),
|
||||
c.closed ? " " : null,
|
||||
c.closed ? el("span", { class: "badge warn" }, t("closed")) : null,
|
||||
),
|
||||
el("div", { class: "row", style: { gap: "0.5rem" } },
|
||||
el("button", { class: "primary", onclick: () => navigate("competition", { id: c.id }) }, t("open")),
|
||||
user.is_system_admin && el("button", { class: "danger", onclick: async () => {
|
||||
if (!confirm(t("confirm_delete_competition_named", { name: c.name }))) return;
|
||||
try {
|
||||
await API.deleteCompetition(c.id);
|
||||
await loadCompetitions();
|
||||
render();
|
||||
} catch (e) { alert((e.data && e.data.error) || e.message); }
|
||||
} }, t("delete")),
|
||||
),
|
||||
el("button", { class: "primary", onclick: () => navigate("competition", { id: c.id }) }, t("open")),
|
||||
));
|
||||
}
|
||||
container.appendChild(grid);
|
||||
|
||||
Reference in New Issue
Block a user