mirror of
https://github.com/Laxilef/OTGateway.git
synced 2026-11-11 08:54:51 +05:00
fix: render scanned Wi-Fi names as text
This commit is contained in:
1 parent
f613731183
commit
ab5b96c970
1 file changed
+11
-3
@@ -141,10 +141,18 @@ const setupNetworkScanForm = (formSelector, tableSelector) => {
|
||||
row.insertCell().textContent = `#${i + 1}`;
|
||||
|
||||
const nameCell = row.insertCell();
|
||||
nameCell.innerHTML = result[i].hidden ? `<i>${result[i].bssid}</i>` : result[i].ssid;
|
||||
if (result[i].hidden) {
|
||||
const hiddenName = document.createElement('i');
|
||||
hiddenName.textContent = result[i].bssid;
|
||||
nameCell.appendChild(hiddenName);
|
||||
|
||||
} else {
|
||||
nameCell.textContent = result[i].ssid;
|
||||
}
|
||||
|
||||
nameCell.onclick = (event) => {
|
||||
const input = document.querySelector("[name='sta[ssid]']");
|
||||
const ssid = event.target.parentNode.dataset.ssid;
|
||||
const ssid = row.dataset.ssid;
|
||||
if (!input || !ssid) {
|
||||
return;
|
||||
}
|
||||
@@ -922,4 +930,4 @@ function c2f(value) {
|
||||
|
||||
function f2c(value) {
|
||||
return (value - 32) * (5 / 9);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user