feat: MVP phase 1 complete

This commit is contained in:
Blake Ridgway
2026-03-25 02:41:17 -05:00
parent 81ae5c6c7b
commit bfa03e6fbf
32 changed files with 3503 additions and 39 deletions

19
static/js/portal.js Normal file
View File

@@ -0,0 +1,19 @@
'use strict';
// Auto-refresh the dashboard every 60 seconds if on the dashboard page.
if (window.location.pathname === '/dashboard') {
setTimeout(() => window.location.reload(), 60_000);
}
// Decode URL-encoded flash messages (redirect-after-post pattern puts them in query string).
const flashEl = document.querySelector('.flash');
if (flashEl) {
flashEl.textContent = decodeURIComponent(flashEl.textContent.replace(/\+/g, ' '));
}
// Confirm-before-submit for any element with data-confirm attribute.
document.querySelectorAll('[data-confirm]').forEach(el => {
el.addEventListener('click', e => {
if (!confirm(el.dataset.confirm)) e.preventDefault();
});
});