Initial commit: DashCaddy v1.0
Full codebase including API server (32 modules + routes), dashboard frontend, DashCA certificate distribution, installer script, and deployment skills.
This commit is contained in:
16
status/js/panel-tabs.js
Normal file
16
status/js/panel-tabs.js
Normal file
@@ -0,0 +1,16 @@
|
||||
// ========== PANEL TAB SWITCHING (shared utility) ==========
|
||||
(function() {
|
||||
document.addEventListener('click', (e) => {
|
||||
const tab = e.target.closest('.panel-tab');
|
||||
if (!tab) return;
|
||||
const panelId = tab.dataset.panel;
|
||||
if (!panelId) return;
|
||||
const tabBar = tab.closest('.panel-tabs');
|
||||
const modalContent = tabBar.closest('.weather-modal-content');
|
||||
tabBar.querySelectorAll('.panel-tab').forEach(t => t.classList.remove('active'));
|
||||
tab.classList.add('active');
|
||||
modalContent.querySelectorAll('.panel-section').forEach(s => s.classList.remove('active'));
|
||||
const target = modalContent.querySelector('#' + panelId);
|
||||
if (target) target.classList.add('active');
|
||||
});
|
||||
})();
|
||||
Reference in New Issue
Block a user