diff --git a/Panel/app.js b/Panel/app.js index c1a7175..5e25c5b 100644 --- a/Panel/app.js +++ b/Panel/app.js @@ -306,7 +306,7 @@ function renderControl(el, s) { : h("button", { class: "btn small ghost", type: "button", onclick: () => go("console") }, "Open console"); problem = h("div", { class: "notice " + (s.state === "error" ? "bad" : "") }, h("div", {}, h("b", {}, s.state === "error" ? "The server could not start" : "Note"), h("div", {}, s.lastError)), fix); } - el.replaceChildren(buttons, problem); + el.replaceChildren(buttons, problem ?? ""); // replaceChildren macht aus null den Text "null" } // ------------------------------------------------------------------ Einstellungen @@ -545,7 +545,7 @@ function renderAdmins(page) { h("div", { class: "section-body row" }, id, h("button", { class: "btn primary", type: "button", onclick: add }, "Add admin")), h("div", { class: "section-body muted small-text" }, "Find a SteamID64 on the player's Steam profile or with ", h("a", { href: "https://steamid.io", target: "_blank", rel: "noopener noreferrer" }, "steamid.io ↗"), - ". Online players can also be made admin on the Players page.")) : null, + ". Online players can also be made admin on the Players page.")) : "", h("div", { class: "section" }, h("div", { class: "section-head" }, h("h2", {}, "In-game admins"), h("span", { class: "muted" }, "can use /admin in the game: kick, ban, teleport, items, world")), h("div", { class: "table-wrap" }, h("table", {}, h("thead", {}, h("tr", {}, h("th", {}, "SteamID"), h("th", {}, "Player"), h("th", {}, ""))), list)))); @@ -584,7 +584,7 @@ function renderBans(page) { h("button", { class: "btn danger", type: "button", onclick: async () => { if (!id.value.trim()) return; if (await act(api("POST", "bans/add", { id: id.value.trim() }))) { id.value = ""; load(); } - } }, "Ban"))) : null, + } }, "Ban"))) : "", h("div", { class: "section" }, h("div", { class: "section-head" }, h("h2", {}, "Banned players")), h("div", { class: "table-wrap" }, h("table", {}, h("thead", {}, h("tr", {}, h("th", {}, "Identity"), h("th", {}, ""))), list))));