From d36c0f4f0b8695ca2a771175fff0fc76ce48aab4 Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Fri, 14 Nov 2025 22:03:43 +0100 Subject: [PATCH] luci-app-travelmate: sync with travelmate update 2.2.1-6 Signed-off-by: Dirk Brenken --- .../resources/view/travelmate/overview.js | 29 +++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/overview.js b/applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/overview.js index e81fed8bf0..15df17ebf4 100644 --- a/applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/overview.js +++ b/applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/overview.js @@ -5,6 +5,7 @@ 'require ui'; 'require uci'; 'require form'; +'require network'; 'require tools.widgets as widgets'; 'require uqr'; @@ -138,13 +139,23 @@ function handleAction(ev) { return view.extend({ load: function () { return Promise.all([ - uci.load('travelmate') + uci.load('travelmate'), + network.getWifiDevices().then(function (res) { + let radios = []; + for (let i = 0; i < res.length; i++) { + radios.push(res[i].sid); + } + return radios; + }) ]); }, render: function (result) { let m, s, o; + /* + main map + */ m = new form.Map('travelmate', 'Travelmate', _('Configuration of the travelmate package to enable travel router functionality. \ For further information check the online documentation.
\ Please note: On first start please call the \'Interface Wizard\' once, to make the necessary network- and firewall settings.')); @@ -297,14 +308,20 @@ return view.extend({ o = s.taboption('general', form.Flag, 'trm_enabled', _('Enabled'), _('Enable the travelmate service.')); o.rmempty = false; - o = s.taboption('general', form.ListValue, 'trm_radio', _('Radio Selection'), _('Restrict travelmate to a single radio or change the overall scanning order.')); - o.value('radio0', _('use the first radio only (radio0)')); - o.value('radio1', _('use the second radio only (radio1)')); - o.value('radio0 radio1', _('use both radios, normal sort order (radio0 radio1)')); - o.value('radio1 radio0', _('use both radios, reverse sort order (radio1 radio0)')); + o = s.taboption('general', form.MultiValue, 'trm_radio', _('Radio Selection'), _('Restrict travelmate to certain radio\(s\).')); + for (let i = 0; i < result[1].length; i++) { + o.value(result[1][i]); + } o.placeholder = _('-- default --'); o.optional = true; o.rmempty = true; + o.write = function(section_id, value) { + uci.set('travelmate', section_id, 'trm_radio', value.join(' ')); + }; + + o = s.taboption('general', form.Flag, 'trm_revradio', _('Reverse Radio Order'), _('Reverse the radio processing order.')); + o.default = 0; + o.rmempty = false; o = s.taboption('general', form.ListValue, 'trm_scanmode', _('WLAN Scan Mode'), _('Send active probe requests or passively listen for beacon frames that are regularly sent by access points.')); o.value('active', _('active')); -- 2.30.2