From bcb046c488aad54b13ff20a93155ce3c0d0fd9af Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Sat, 20 Aug 2022 18:56:02 +0200 Subject: [PATCH] luci-app-travelmate: sync with travelmate 2.1.0 * expose new options to LuCI * cosmetics Signed-off-by: Dirk Brenken dev@brenken.org Signed-off-by: Dirk Brenken --- applications/luci-app-travelmate/Makefile | 2 +- .../resources/view/travelmate/overview.js | 21 ++++++++++++++----- .../resources/view/travelmate/stations.js | 2 +- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/applications/luci-app-travelmate/Makefile b/applications/luci-app-travelmate/Makefile index 08ad6c4a5b..28b9ba0603 100644 --- a/applications/luci-app-travelmate/Makefile +++ b/applications/luci-app-travelmate/Makefile @@ -1,4 +1,4 @@ -# Copyright 2017-2020 Dirk Brenken (dev@brenken.org) +# Copyright 2017-2022 Dirk Brenken (dev@brenken.org) # This is free software, licensed under the Apache License, Version 2.0 include $(TOPDIR)/rules.mk 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 5b8f58e298..88a0aadf5e 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 @@ -185,9 +185,9 @@ return view.extend({ if (station_mac && info) { station_mac.textContent = info.data.station_mac || '-'; } - var station_interface = document.getElementById('station_interface'); - if (station_interface && info) { - station_interface.textContent = info.data.station_interface || '-'; + var station_interfaces = document.getElementById('station_interfaces'); + if (station_interfaces && info) { + station_interfaces.textContent = info.data.station_interfaces || '-'; } var wpa_flags = document.getElementById('wpa_flags'); if (wpa_flags && info) { @@ -236,8 +236,8 @@ return view.extend({ E('div', { 'class': 'cbi-value-field', 'id': 'station_mac', 'style': 'color:#37c' }, '-') ]), E('div', { 'class': 'cbi-value' }, [ - E('label', { 'class': 'cbi-value-title', 'style': 'padding-top:0rem' }, _('Station Interface')), - E('div', { 'class': 'cbi-value-field', 'id': 'station_interface', 'style': 'color:#37c' }, '-') + E('label', { 'class': 'cbi-value-title', 'style': 'padding-top:0rem' }, _('Station Interfaces')), + E('div', { 'class': 'cbi-value-field', 'id': 'station_interfaces', 'style': 'color:#37c' }, '-') ]), E('div', { 'class': 'cbi-value' }, [ E('label', { 'class': 'cbi-value-title', 'style': 'padding-top:0rem' }, _('WPA Flags')), @@ -316,6 +316,17 @@ return view.extend({ o.default = 1; o.rmempty = false; + o = s.taboption('general', form.Flag, 'trm_vpn', _('VPN processing'), _('VPN connections will be managed by travelmate.')); + o.default = 1; + o.rmempty = false; + + o = s.taboption('general', widgets.NetworkSelect, 'trm_vpnifacelist', _('Limit VPN processing'), _('Limit VPN processing to certain interfaces.')); + o.depends('trm_vpn', '1'); + o.unspecified = true; + o.multiple = true; + o.nocreate = true; + o.rmempty = true; + o = s.taboption('general', form.Flag, 'trm_netcheck', _('Net Error Check'), _('Treat missing internet availability as an error.')); o.depends('trm_captive', '1'); o.default = 0; diff --git a/applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/stations.js b/applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/stations.js index 20443f9799..fcd98fa37f 100644 --- a/applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/stations.js +++ b/applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/stations.js @@ -698,7 +698,7 @@ return view.extend({ return handleSectionsVal('set', section_id, 'vpnservice', value); } - o = s.taboption('vpn', widgets.NetworkSelect, '_vpniface', _('VPN Interface'), _('The logical vpn network interface, e.g. \'wg0\' or \'tun0\'.')); + o = s.taboption('vpn', widgets.NetworkSelect, '_vpniface', _('VPN Interface'), _('The logical vpn network interface like \'wg0\'.')); o.unspecified = false; o.nocreate = true; o.optional = true; -- 2.30.2