This commit is contained in:
Mateusz Gruszczyński committed 2026-11-22 15:35:11 +01:00
1 parent 748fe1d146
commit 27b640a0df
22 files changed
+532 -30

No files matched your search

+4 -3
View File
@@ -138,12 +138,13 @@
if (!envelope) return; const next = structuredClone(envelope.config), target = next.tls.certificates.find(c => c.id === cert.id); if (!target?.issuer) return;
target.issuer.auto_renew = !enabled; if (await saveSection("tls", next.tls || {})) void refresh();
});
for (const [key, dry_run] of [["renewalNow", false], ["renewalDryRun", true]]) {
for (const [key, dry_run, force] of [["renewalNow", false, false], ["renewalForce", false, true], ["renewalDryRun", true, false]]) {
const node = b(key, async () => {
if (force && !(await appConfirm(t("renewalForceConfirm"), { danger: true }))) return;
node.disabled = true; const epoch = authEpoch;
try {
const data = await api("/api/acme/renew", { method: "POST", body: JSON.stringify({ certificate_id: cert.id, dry_run }) });
if (epoch === authEpoch && authenticated) { render(data.job); selectTab("renewal"); toast(t("acme.renewing")); }
const data = await api("/api/acme/renew", { method: "POST", body: JSON.stringify({ certificate_id: cert.id, dry_run, force }) });
if (epoch === authEpoch && authenticated) { render(data.job); selectTab("renewal"); toast(t(force ? "acme.renewing_forced" : "acme.renewing")); }
} catch (error) {
if (epoch === authEpoch) toast(error.message, true);
} finally { node.disabled = false; }