MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / backfillWardrivingGps

Function backfillWardrivingGps

web/scripts/ragnar_modern.js:18602–18633  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18600}
18601
18602function 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
18617function 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
18634function renderDashboardInterfaceSwitch(state) {
18635 const wrapper = document.getElementById('wifi-dashboard-interface-switch');
18636 const buttonsContainer = document.getElementById('wifi-dashboard-interface-buttons');

Callers

nothing calls this directly

Calls 2

addMethod · 0.80
loadWardrivingMapDataFunction · 0.70

Tested by

no test coverage detected