* Check if credentials exist for a target (debounced)
(target)
| 20411 | console.log('Wi-Fi status elements found, updating...'); |
| 20412 | |
| 20413 | if (!activeInterface && data.interface) { |
| 20414 | activeInterface = setSelectedWifiInterface(data.interface, { skipRefresh: true }); |
| 20415 | } |
| 20416 | if (Array.isArray(data.interfaces)) { |
| 20417 | renderWifiInterfaceSwitch(data.interfaces); |
| 20418 | } |
| 20419 | const interfaceLabel = data.interface ? data.interface : activeInterface; |
| 20420 | const ipBadge = data.ip_address ? ` (${data.ip_address})` : ''; |
| 20421 | |
| 20422 | // Say up front when this adapter cannot be an access point, instead of |
| 20423 | // letting the user find out by losing Wi-Fi. |
| 20424 | wifiApBlocker = (!data.ap_mode_active && data.ap_supported === false) |
| 20425 | ? (data.ap_error || `The Wi-Fi adapter on ${data.ap_interface || 'this device'} does not support Access Point mode. AP Mode cannot be started with it.`) |
| 20426 | : null; |
| 20427 | if (data.ap_mode_active) { |
| 20428 | setApModeNotice(''); |
| 20429 | } else { |
| 20430 | setApModeNotice(wifiApBlocker || data.ap_error || ''); |
no test coverage detected