(name)
| 1197 | if (selectedBtn) { |
| 1198 | selectedBtn.classList.add('bg-Ragnar-600'); |
| 1199 | selectedBtn.classList.remove('text-gray-300', 'hover:text-white', 'hover:bg-gray-700'); |
| 1200 | } |
| 1201 | |
| 1202 | loadTabData(tabName); |
| 1203 | |
| 1204 | if (tabName === 'config') { |
| 1205 | try { refreshSensingInstallCard(); syncRusenseTabToggle(); syncTerminalToggle(); } catch (e) { /* ignore */ } |
| 1206 | } |
| 1207 | |
| 1208 | const mobileMenu = document.getElementById('mobile-menu'); |
| 1209 | if (mobileMenu) { |
| 1210 | mobileMenu.classList.add('hidden'); |
| 1211 | } |
| 1212 | } |
| 1213 | |
| 1214 | function _setSubtabActive(btn, active) { |
| 1215 | if (!btn) return; |
| 1216 | btn.classList.toggle('bg-Ragnar-600', active); |
| 1217 | btn.classList.toggle('text-white', active); |
| 1218 | btn.classList.toggle('text-slate-400', !active); |
| 1219 | btn.classList.toggle('hover:bg-slate-700', !active); |
| 1220 | btn.classList.toggle('hover:text-white', !active); |
| 1221 | } |
| 1222 | |
| 1223 | function showNetworkSubtab(name) { |
| 1224 | const views = { |
| 1225 | hosts: 'net-sub-hosts', archive: 'net-sub-archive', map: 'net-sub-map', |
| 1226 | diagnostics: 'net-sub-diagnostics', switch: 'net-sub-switch', interfaces: 'net-sub-interfaces', |
| 1227 | wifi: 'net-sub-wifi' |
| 1228 | }; |
no test coverage detected