fix: allow retrying themes load on error

This commit is contained in:
2026-05-20 17:17:20 +02:00
committed by Mikkel Elvers
parent 066305403b
commit 68396c591e

View File

@@ -388,6 +388,12 @@
if (closeBtn) closeBtn.addEventListener('click', close);
dialog.addEventListener('click', (e) => { if (e.target === dialog) close(); });
document.addEventListener('keydown', (e) => { if (e.key === 'Escape') close(); });
const loader = document.querySelector('[data-themes-loader]');
if (loader) {
loader.addEventListener('htmx:responseError', () => { themesRequested = false; });
loader.addEventListener('htmx:sendError', () => { themesRequested = false; });
}
})();
</script>