Fix admin panel

This commit is contained in:
2026-07-13 02:00:27 -03:00
parent 047e4be207
commit 64b1fc5cb3
12 changed files with 535 additions and 146 deletions
+7 -1
View File
@@ -98,7 +98,13 @@ resellerForm.addEventListener("submit", async e => {
});
async function deleteReseller(username) {
if (!confirm(`Delete reseller "${username}"? All their SSH sessions will be disconnected.`)) return;
const accepted = await panelConfirm({
tone:"danger", icon:"×", title:t("Delete reseller"),
message:t("Delete reseller \"{name}\"?", {name:username}),
detail:t("Their owned access will be removed and active SSH sessions will be disconnected."),
confirmLabel:t("Delete reseller"),
});
if (!accepted) return;
resellerStatus.textContent = `Deleting ${username}`;
try {
const res = await api(`/api/resellers/delete?username=${encodeURIComponent(username)}`, { method:"DELETE" });