Skip to content

Commit

Permalink
Up to 1.0.14-20220716
Browse files Browse the repository at this point in the history
  • Loading branch information
4IceG authored Jul 16, 2022
1 parent 6f00fdf commit d8deb5a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 6 deletions.
2 changes: 1 addition & 1 deletion luci-app-modemband/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PKG_NAME:=luci-app-modemband
LUCI_TITLE:=LuCI panel for modemband
LUCI_PKGARCH:=all
LUCI_DEPENDS:=+sms-tool +modemband
PKG_VERSION:=1.0.13-20220701
PKG_VERSION:=1.0.14-20220716
PKG_RELEASE:=1

define Package/$(PKG_NAME)
Expand Down
18 changes: 16 additions & 2 deletions luci-app-modemband/htdocs/luci-static/resources/view/modem/blte.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,16 @@ function handleAction(ev) {
if (confirm(_('Do you really want to set up all possible bands for the modem?')))
{
fs.exec_direct('/usr/bin/modemband.sh', [ 'setbands', 'default' ]);
ui.addNotification(null, E('p', _('The new bands settings have been sent to the modem. If the changes are not visible, a restart of the connection, modem or router may be required.')), 'info');

return uci.load('modemband').then(function() {
var nuser = (uci.get('modemband', '@modemband[0]', 'notify'));

if (nuser == '0') {
ui.addNotification(null, E('p', _('The new bands settings have been sent to the modem. If the changes are not visible, a restart of the connection, modem or router may be required.')), 'info');
}

});

}
}
if (ev === 'rebootdev') {
Expand Down Expand Up @@ -442,14 +451,19 @@ return view.extend({
var ax = args.toString();
ax = ax.replace(/,/g, ' ')
fs.exec_direct('/usr/bin/modemband.sh', [ 'setbands', ax ]);
ui.addNotification(null, E('p', _('The new bands settings have been sent to the modem. If the changes are not visible, a restart of the connection, modem or router may be required.') ), 'info');

return uci.load('modemband').then(function() {
var wrestart = (uci.get('modemband', '@modemband[0]', 'wanrestart'));
var mrestart = (uci.get('modemband', '@modemband[0]', 'modemrestart'));
var cmdrestart = (uci.get('modemband', '@modemband[0]', 'restartcmd'));
var wname = (uci.get('modemband', '@modemband[0]', 'iface'));
var sport = (uci.get('modemband', '@modemband[0]', 'set_port'));

var nuser = (uci.get('modemband', '@modemband[0]', 'notify'));

if (nuser == '0') {
ui.addNotification(null, E('p', _('The new bands settings have been sent to the modem. If the changes are not visible, a restart of the connection, modem or router may be required.')), 'info');
}

if (wrestart == '1') {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ return view.extend({

o = s.option(form.Value, 'set_port', _('Port for communication with the modem'),
_("Select one of the available ttyUSBX ports."));
devs.forEach(function(dev) {
o.value('/dev/' + dev.name);
});
devs.sort((a, b) => a.name > b.name);
devs.forEach(dev => o.value('/dev/' + dev.name));

o.placeholder = _('Please select a port');
o.rmempty = false;

Expand All @@ -57,6 +57,12 @@ return view.extend({
o.depends("modemrestart", "1");
o.rmempty = false;

o = s.option(form.Flag, 'notify', _('Turn off notifications'),
_('Checking this option disables the notification that appears every time the bands are changed.')
);
o.rmempty = false;

return m.render();
}
});

6 changes: 6 additions & 0 deletions luci-app-modemband/po/pl/modemband.po
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,9 @@ msgstr "Wyłącz"

msgid "Enable"
msgstr "Włącz"

msgid "Turn off notifications"
msgstr "Wyłącz powiadomienia"

msgid "Checking this option disables the notification that appears every time the bands are changed."
msgstr "Zaznaczenie opcji wyłącza powiadomienie pojawiające się przy każdej zmianie pasm."

0 comments on commit d8deb5a

Please sign in to comment.