mirror of
https://github.com/openwrt/luci
synced 2025-01-09 04:28:37 +08:00
luci-mod-network: properly handle "no signal" and "disabled" in signal badges
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
9ae591b38f
commit
cf09705ee3
@ -56,9 +56,13 @@ function render_signal_badge(signalPercent, signalValue, noiseValue, wrap) {
|
||||
value = '%d %s'.format(signalValue, _('dBm'));
|
||||
title = '%s: %d %s'.format(_('Signal'), signalValue, _('dBm'));
|
||||
}
|
||||
else if (signalPercent > -1) {
|
||||
value = '\xa0---\xa0';
|
||||
title = _('No signal');
|
||||
}
|
||||
else {
|
||||
value = E('em', {}, E('small', {}, [ _('disabled') ]));
|
||||
title = _('No signal');
|
||||
title = _('Interface is disabled');
|
||||
}
|
||||
|
||||
return E('div', { 'class': wrap ? 'center' : 'ifacebadge', 'title': title },
|
||||
|
Loading…
Reference in New Issue
Block a user