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

Function checkTargetCredentials

web/scripts/ragnar_modern.js:20413–20427  ·  view source on GitHub ↗

* Check if credentials exist for a target (debounced)

(target)

Source from the content-addressed store, hash-verified

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 || '');

Callers 2

saveTargetCredentialsFunction · 0.70
deleteTargetCredentialFunction · 0.70

Calls 2

hideCredentialBadgeFunction · 0.70
_doCredentialCheckFunction · 0.70

Tested by

no test coverage detected