diff --git a/assets/css/base.css b/assets/css/base.css index 38dfeea..6c17c7d 100644 --- a/assets/css/base.css +++ b/assets/css/base.css @@ -1317,7 +1317,8 @@ select option:checked { .lt-modal-close:active { color: var(--accent-red); opacity: 0.7; } .lt-modal-close:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; border-radius: 2px; } -/* Modal size modifier */ +/* Modal size modifiers */ +.lt-modal-xs { width: min(280px, 92vw); } .lt-modal-sm { width: min(360px, 92vw); } /* Modal header danger variant */ diff --git a/assets/js/dashboard.js b/assets/js/dashboard.js index 7ee4428..0f4503b 100644 --- a/assets/js/dashboard.js +++ b/assets/js/dashboard.js @@ -198,9 +198,10 @@ document.addEventListener('DOMContentLoaded', function() { case 'open-settings-modal': if (typeof openSettingsModal === 'function') openSettingsModal(); break; - // Refresh + // Refresh — use lt.autoRefresh.now() so modal/focus guards are respected case 'manual-refresh': - window.location.reload(); + if (window.lt && lt.autoRefresh) lt.autoRefresh.now(); + else window.location.reload(); break; // Export case 'toggle-export-menu': diff --git a/assets/js/utils.js b/assets/js/utils.js index ac44f30..c83926d 100644 --- a/assets/js/utils.js +++ b/assets/js/utils.js @@ -26,7 +26,7 @@ function showConfirmModal(title, message, type = 'warning', onConfirm, onCancel const color = colors[type] || colors.warning; const icon = icons[type] || icons.warning; const safeTitle = lt.escHtml(title); - const safeMessage = lt.escHtml(message); + const safeMessage = lt.escHtml(message).replace(/\n/g, '
'); document.body.insertAdjacentHTML('beforeend', ` -
- +
+

${safeMessage}

-