eat: implement Holesail-Browser enhancement plan
CI / Build & Test (push) Successful in 3m19s

- Add unit tests (hostname-validator, TLDs, payload-schemas) and integration tests for message handler registry
- Refactor native host message router into handler registry (handlers/state, tunnels, ssh, rdp, backup, ca, connections)
- Add ESLint config and npm test + lint steps in CI
- Dashboard: visibility-based refresh pause, configurable refresh interval (2s/5s/10s/paused)
- Accessibility: ARIA on nav and modals, focus trap and restore, prefers-reduced-motion
- Empty states: primary action buttons for virtual hosts, servers, service tunnels
- Native host rate limiting for backup and CA operations; update SECURITY.md
- CONTRIBUTING: "Adding a new dashboard page", dev workflow; add npm run dev script
This commit is contained in:
Raven Scott
2026-03-15 00:24:31 -04:00
parent 8df1ef3ec6
commit 6fcd9fcf2b
38 changed files with 2028 additions and 279 deletions
+12 -1
View File
@@ -35,10 +35,19 @@ function setupEvents() {
});
});
// Mark settings dirty when any number input inside the settings page changes
// Mark settings dirty when any number input or select inside the settings page changes
document.querySelectorAll('#page-settings input[type="number"]').forEach(input => {
input.addEventListener('input', _markSettingsDirty);
});
document.querySelectorAll('#page-settings select').forEach(sel => {
sel.addEventListener('change', _markSettingsDirty);
});
// Empty-state primary buttons: open the corresponding add modal
document.addEventListener('click', (e) => {
const btn = e.target.closest('[data-open-modal]');
if (btn && btn.dataset.openModal) openModal(btn.dataset.openModal);
});
// Save settings
$('btnSaveSettings')?.addEventListener('click', saveSettings);
@@ -52,6 +61,8 @@ function setupEvents() {
if (response && response.settings) settings = { ...SETTINGS_DEFAULTS, ...response.settings };
_clearSettingsDirty();
updateSettingsUI();
if (typeof window._restartRefreshInterval === 'function') window._restartRefreshInterval();
if (typeof window._restartPingInterval === 'function') window._restartPingInterval();
showToast('Settings reset to defaults', 'success');
}
);