fix: allow retrying themes load on error
This commit is contained in:
@@ -388,6 +388,12 @@
|
|||||||
if (closeBtn) closeBtn.addEventListener('click', close);
|
if (closeBtn) closeBtn.addEventListener('click', close);
|
||||||
dialog.addEventListener('click', (e) => { if (e.target === dialog) close(); });
|
dialog.addEventListener('click', (e) => { if (e.target === dialog) close(); });
|
||||||
document.addEventListener('keydown', (e) => { if (e.key === 'Escape') 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>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user