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

Function renderHostAlertSection

web/scripts/ragnar_modern.js:16862–16898  ·  view source on GitHub ↗
(alerts, ip)

Source from the content-addressed store, hash-verified

16860 passwordInput.type = 'text';
16861 if (eyeIcon) {
16862 eyeIcon.innerHTML = `
16863 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"></path>
16864 `;
16865 }
16866 } else {
16867 passwordInput.type = 'password';
16868 if (eyeIcon) {
16869 eyeIcon.innerHTML = `
16870 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path>
16871 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"></path>
16872 `;
16873 }
16874 }
16875}
16876
16877async function connectToWifiNetwork() {
16878 if (!selectedWifiNetwork) return;
16879
16880 const passwordInput = document.getElementById('wifi-connect-password');
16881 const passwordSection = document.getElementById('wifi-password-section');
16882 const saveCheckbox = document.getElementById('wifi-save-network');
16883 const statusDiv = document.getElementById('wifi-connect-status');
16884 const submitBtn = document.getElementById('wifi-connect-submit-btn');
16885
16886 const ssid = selectedWifiNetwork.ssid;
16887 const isKnown = selectedWifiNetwork.isKnown;
16888 const isSecure = selectedWifiNetwork.isSecure;
16889 const editMode = selectedWifiNetwork.editMode;
16890 const needsPassword = isSecure && (!isKnown || editMode);
16891 const password = needsPassword ? (passwordInput ? passwordInput.value : '') : null;
16892 const saveNetwork = saveCheckbox ? saveCheckbox.checked : true;
16893
16894 // Validate password for secured networks that need one
16895 if (needsPassword && !password) {
16896 if (statusDiv) {
16897 statusDiv.classList.remove('hidden');
16898 statusDiv.innerHTML = '<div class="bg-red-600 rounded p-3 text-sm">Please enter a password</div>';
16899 }
16900 return;
16901 }

Callers 1

showTrafficHostDetailFunction · 0.70

Calls 3

reverseMethod · 0.80
escapeHtmlFunction · 0.70
formatAlertDetailsFunction · 0.70

Tested by

no test coverage detected