* Delete credentials for a target
(targetHost)
| 20876 | <div class="flex items-center gap-2 text-sm font-semibold text-white"> |
| 20877 | <span>${escapeHtml(entry.name || 'iface')}</span> |
| 20878 | <span class="text-[10px] px-2 py-0.5 rounded ${roleClass}">${formatInterfaceRole(entry.role)}</span> |
| 20879 | ${focusChip} |
| 20880 | </div> |
| 20881 | <div class="text-[11px] text-gray-400">${connectionLabel}</div> |
| 20882 | </div> |
| 20883 | <button type="button" class="${buttonClasses}" data-interface="${escapeHtml(entry.name || '')}" data-scan-state="${scanning ? 'enabled' : 'disabled'}">${buttonLabel}</button> |
| 20884 | </div> |
| 20885 | <div class="text-[11px] ${scanClass}">${scanNote}${ipLabel}</div> |
| 20886 | </div> |
| 20887 | `; |
| 20888 | }).join(''); |
| 20889 | |
| 20890 | listEl.querySelectorAll('button[data-interface]').forEach(button => { |
| 20891 | button.addEventListener('click', handleScanControlToggle); |
| 20892 | }); |
| 20893 | |
| 20894 | updateMultiInterfaceModeControls(state); |
| 20895 | } |
| 20896 | |
| 20897 | function updateMultiInterfaceModeControls(state) { |
| 20898 | const buttonsContainer = document.getElementById('wifi-multi-mode-buttons'); |
| 20899 | const focusWrapper = document.getElementById('wifi-multi-focus-controls'); |
| 20900 | const focusSelect = document.getElementById('wifi-multi-focus-select'); |
| 20901 | if (!buttonsContainer || !focusWrapper || !focusSelect) { |
| 20902 | return; |
| 20903 | } |
| 20904 | |
| 20905 | const activeMode = (state && state.scan_mode) ? state.scan_mode.toLowerCase() : 'single'; |
| 20906 | const focusInterface = state && state.focus_interface ? state.focus_interface : ''; |
| 20907 | const interfaces = state && Array.isArray(state.interfaces) ? state.interfaces : []; |
| 20908 | |
| 20909 | const buttons = buttonsContainer.querySelectorAll('button[data-mode]'); |
| 20910 | buttons.forEach(button => { |
| 20911 | const mode = button.dataset.mode; |
| 20912 | if (!mode) { |
nothing calls this directly
no test coverage detected