Skip to content

Commit

Permalink
Update progress bars.
Browse files Browse the repository at this point in the history
  • Loading branch information
4IceG authored Dec 19, 2021
1 parent 99c68e8 commit 101ef83
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 27 deletions.
2 changes: 1 addition & 1 deletion luci-app-3ginfo-lite/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PKG_NAME:=luci-app-3ginfo-lite
LUCI_TITLE:=LuCI panel for 3ginfo-lite
LUCI_PKGARCH:=all
LUCI_DEPENDS:=+sms-tool
PKG_VERSION:=1.0.9-20211213
PKG_VERSION:=1.0.9-20211218
PKG_RELEASE:=1

include $(TOPDIR)/feeds/luci/luci.mk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,25 @@ var pc = Math.floor((100 / mn) * vn);
if (vn >= 20 && vn <= 31 )
{
pg.firstElementChild.style.background = 'lime';
var tip = _('Signal strength very good');
var tip = _('Very good');
};
if (vn >= 14 && vn <= 19)
{
pg.firstElementChild.style.background = 'yellow';
var tip = _('Good signal strength');
var tip = _('Good');
};
if (vn >= 10 && vn <= 13)
{
pg.firstElementChild.style.background = 'darkorange';
var tip = _('Signal strength weak');
var tip = _('Weak');
};
if (vn <= 9 && vn >= 1)
{
pg.firstElementChild.style.background = 'red';
var tip = _('Signal strength very weak');
var tip = _('Very weak');
};
pg.firstElementChild.style.width = pc + '%';
//pg.style.width = '50%';
pg.style.width = '50%';
pg.setAttribute('title', '%s'.format(v) + ' | ' + tip + ' ');
}

Expand All @@ -52,25 +52,25 @@ var pc = Math.floor(100*(1-(-50 - vn)/(-50 - mn)));
if (vn >= -74)
{
pg.firstElementChild.style.background = 'lime';
var tip = _('Signal strength very good');
var tip = _('Very good');
};
if (vn >= -85 && vn <= -75)
{
pg.firstElementChild.style.background = 'yellow';
var tip = _('Good signal strength');
var tip = _('Good');
};
if (vn >= -93 && vn <= -86)
{
pg.firstElementChild.style.background = 'darkorange';
var tip = _('Signal strength weak');
var tip = _('Weak');
};
if (vn < -94)
{
pg.firstElementChild.style.background = 'red';
var tip = _('Signal strength very weak');
var tip = _('Very weak');
};
pg.firstElementChild.style.width = pc + '%';
//pg.style.width = '50%';
pg.style.width = '50%';
pg.firstElementChild.style.animationDirection = "reverse";
pg.setAttribute('title', '%s'.format(v) + ' | ' + tip + ' ');
}
Expand All @@ -85,25 +85,25 @@ var pc = Math.floor(120*(1-(-50 - vn)/(-50 - mn)));
if (vn >= -79 )
{
pg.firstElementChild.style.background = 'lime';
var tip = _('Signal strength very good');
var tip = _('Very good');
};
if (vn >= -90 && vn <= -80)
{
pg.firstElementChild.style.background = 'yellow';
var tip = _('Good signal strength');
var tip = _('Good');
};
if (vn >= -100 && vn <= -91)
{
pg.firstElementChild.style.background = 'darkorange';
var tip = _('Signal strength weak');
var tip = _('Weak');
};
if (vn < -100)
{
pg.firstElementChild.style.background = 'red';
var tip = _('Signal strength very weak');
var tip = _('Very weak');
};
pg.firstElementChild.style.width = pc + '%';
//pg.style.width = '50%';
pg.style.width = '50%';
pg.firstElementChild.style.animationDirection = "reverse";
pg.setAttribute('title', '%s'.format(v) + ' | ' + tip + ' ');
}
Expand Down Expand Up @@ -134,7 +134,7 @@ var pc = Math.floor(100-(100*(1-((mn - vn)/(mn - 25)))));
var tip = _('Cell edge');
};
pg.firstElementChild.style.width = pc + '%';
//pg.style.width = '50%';
pg.style.width = '50%';
pg.firstElementChild.style.animationDirection = "reverse";
pg.setAttribute('title', '%s'.format(v) + ' | ' + tip + ' ');
}
Expand All @@ -143,7 +143,7 @@ function rsrq_bar(v, m) {
var pg = document.querySelector('#rsrq')
var vn = parseInt(v) || 0;
var mn = parseInt(m) || 100;
var pc = Math.floor(130-(100/mn)*vn);
var pc = Math.floor(125-(100/mn)*vn);
if (vn > 0) { vn = 0; };
if (vn >= -9 )
{
Expand All @@ -166,7 +166,7 @@ if (vn > 0) { vn = 0; };
var tip = _('Cell edge');
};
pg.firstElementChild.style.width = pc + '%';
//pg.style.width = '50%';
pg.style.width = '50%';
pg.firstElementChild.style.animationDirection = "reverse";
pg.setAttribute('title', '%s'.format(v) + ' | ' + tip + ' ');
}
Expand Down Expand Up @@ -518,3 +518,4 @@ return view.extend({
handleSave: null,
handleReset: null
});

16 changes: 8 additions & 8 deletions luci-app-3ginfo-lite/po/pl/3ginfo.po
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,17 @@ msgstr ""
msgid "Protocol:"
msgstr "Protokół:"

msgid "Signal strength very good"
msgstr "Moc sygnału bardzo dobra"
msgid "Very good"
msgstr "Bardzo dobry"

msgid "Good signal strength"
msgstr "Moc sygnału dobra"
msgid "Good"
msgstr "Dobry"

msgid "Signal strength weak"
msgstr "Moc sygnału słaba"
msgid "Weak"
msgstr "Słaby"

msgid "Signal strength very weak"
msgstr "Moc sygnału bardzo słaba"
msgid "Very weak"
msgstr "Bardzo słaby"

msgid "Excellent"
msgstr "Doskonały"
Expand Down

0 comments on commit 101ef83

Please sign in to comment.