()
| 18600 | } |
| 18601 | |
| 18602 | function updateWifiInterfaceSwitchActiveState(activeInterface) { |
| 18603 | const buttonsContainer = document.getElementById('wifi-interface-switch-buttons'); |
| 18604 | if (!buttonsContainer) return; |
| 18605 | const buttons = buttonsContainer.querySelectorAll('button[data-interface]'); |
| 18606 | buttons.forEach(button => { |
| 18607 | const isActive = button.dataset.interface === activeInterface; |
| 18608 | button.classList.remove('bg-Ragnar-600', 'border-Ragnar-400', 'text-white', 'shadow-lg', 'bg-slate-800', 'border-slate-600', 'text-gray-300'); |
| 18609 | if (isActive) { |
| 18610 | button.classList.add('bg-Ragnar-600', 'border-Ragnar-400', 'text-white', 'shadow-lg'); |
| 18611 | } else { |
| 18612 | button.classList.add('bg-slate-800', 'border-slate-600', 'text-gray-300'); |
| 18613 | } |
| 18614 | }); |
| 18615 | } |
| 18616 | |
| 18617 | function updateDashboardInterfaceSwitchActiveState(activeInterface) { |
| 18618 | const buttonsContainer = document.getElementById('wifi-dashboard-interface-buttons'); |
| 18619 | if (!buttonsContainer) { |
| 18620 | return; |
| 18621 | } |
| 18622 | buttonsContainer.querySelectorAll('button[data-interface]').forEach(button => { |
| 18623 | const isActive = button.dataset.interface === activeInterface; |
| 18624 | button.classList.remove('bg-Ragnar-500', 'text-white', 'border-Ragnar-400', 'shadow'); |
| 18625 | button.classList.remove('bg-slate-800', 'text-gray-300', 'border-slate-700'); |
| 18626 | if (isActive) { |
| 18627 | button.classList.add('bg-Ragnar-500', 'text-white', 'border-Ragnar-400', 'shadow'); |
| 18628 | } else { |
| 18629 | button.classList.add('bg-slate-800', 'text-gray-300', 'border-slate-700'); |
| 18630 | } |
| 18631 | }); |
| 18632 | } |
| 18633 | |
| 18634 | function renderDashboardInterfaceSwitch(state) { |
| 18635 | const wrapper = document.getElementById('wifi-dashboard-interface-switch'); |
| 18636 | const buttonsContainer = document.getElementById('wifi-dashboard-interface-buttons'); |
nothing calls this directly
no test coverage detected