Fix recovery-codes dialog not appearing in Safari after 2FA setup (v0.11.119)

This commit is contained in:
marvin
2026-09-16 17:56:30 -04:00
parent 5417d5eeed
commit e0463525ef
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "site-gateway",
"version": "0.11.118",
"version": "0.11.119",
"private": true,
"description": "Site Gateway: simple self-hosted website publishing, reverse proxying, and automatic HTTPS.",
"type": "module",
+2 -2
View File
@@ -788,7 +788,7 @@ $("#mfa-setup-confirm-form").addEventListener("submit", async event => {
state.user.mfaEnabled = true;
renderAccount();
$("#mfa-recovery-codes").textContent = result.recoveryCodes.join("\n");
$("#mfa-recovery-dialog").showModal();
requestAnimationFrame(() => $("#mfa-recovery-dialog").showModal());
toast("Two-factor authentication enabled.");
} catch (error) { $("#mfa-setup-error").textContent = error.message; }
});
@@ -812,7 +812,7 @@ $("#account-mfa-recovery").addEventListener("click", async () => {
try {
const result = await api("/api/account/mfa/recovery-codes", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ password }) });
$("#mfa-recovery-codes").textContent = result.recoveryCodes.join("\n");
$("#mfa-recovery-dialog").showModal();
requestAnimationFrame(() => $("#mfa-recovery-dialog").showModal());
toast("Recovery codes regenerated. Your old codes no longer work.");
} catch (error) { toast(error.message, "error"); }
});
+1 -1
View File
@@ -430,6 +430,6 @@
<div id="toast" class="toast" role="status"></div>
<div id="update-banner" class="update-banner hidden" role="status"><span>A new version of Site Gateway is available.</span><div class="update-banner-actions"><button id="update-banner-refresh" class="button primary">Refresh</button><button id="update-banner-dismiss" class="text-button">Dismiss</button></div></div>
<!-- App scripts: core (app.js) then extended views/admin (features.js) -->
<script src="/app.js?v=0.11.118" defer></script><script src="/features.js?v=0.11.114" defer></script>
<script src="/app.js?v=0.11.119" defer></script><script src="/features.js?v=0.11.114" defer></script>
</body>
</html>