wifi: unify signal view

This commit is contained in:
coolsnowwolf 2023-05-05 18:57:36 +08:00
parent 33210a2901
commit 39c656f32c
3 changed files with 4 additions and 4 deletions

View File

@ -218,7 +218,7 @@
{
var iw = st[i];
var is_assoc = (iw.bssid && iw.bssid != '00:00:00:00:00:00' && iw.channel && iw.mode != 'Unknown' && !iw.disabled);
var p = iw.quality;
var p = (iw.quality == 0) ? 100 : iw.quality;
var q = is_assoc ? p : -1;
var icon;

View File

@ -7,7 +7,7 @@
if (iw && (iw = iw[0]))
{
var is_assoc = (iw.bssid && iw.bssid != '00:00:00:00:00:00' && iw.channel && !iw.disabled);
var p = iw.quality;
var p = (iw.quality == 0) ? 100 : iw.quality;
var q = is_assoc ? p : -1;
var icon;

View File

@ -497,7 +497,7 @@
if (!is_assoc)
icon = "<%=resource%>/icons/signal-none.png";
else if (net.quality == 0)
icon = "<%=resource%>/icons/signal-0.png";
icon = "<%=resource%>/icons/signal-75-100.png";
else if (net.quality < 25)
icon = "<%=resource%>/icons/signal-0-25.png";
else if (net.quality < 50)
@ -517,7 +517,7 @@
'<strong><%:Channel%>:</strong> %d (%.3f <%:GHz%>)<br />' +
'<strong><%:Bitrate%>:</strong> %s <%:Mbit/s%><br />',
icon, net.signal, net.noise,
net.quality,
(net.quality == 0) ? 100 : net.quality,
net.link, net.ssid || '?',
net.mode,
net.channel, net.frequency,