diff options
author | Dirk Brenken <dev@brenken.org> | 2023-10-24 17:33:37 +0200 |
---|---|---|
committer | Dirk Brenken <dev@brenken.org> | 2023-10-24 17:33:37 +0200 |
commit | 425bcfcb5285a1e1d3bea2680afbc21030dfd23e (patch) | |
tree | f32c32950faafa7a73405a2feb59465601e8df58 /applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/stations.js | |
parent | 30a8a0dae7039556bbe04862f249eb49380a953b (diff) |
luci-app-travelmate: sync with travelmate 2.1.1
Signed-off-by: Dirk Brenken dev@brenken.org
Signed-off-by: Dirk Brenken <dev@brenken.org>
Diffstat (limited to 'applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/stations.js')
-rw-r--r-- | applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/stations.js | 9 |
1 files changed, 9 insertions, 0 deletions
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 00ff71c8de..0fa5169f5b 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 @@ -70,6 +70,7 @@ function handleSectionsAdd(iface) { w_sections = uci.sections('wireless', 'wifi-iface'); t_sections = uci.sections('travelmate', 'uplink'); + for (var i = 0; i < w_sections.length; i++) { if (w_sections[i].mode !== 'sta' || w_sections[i].network !== iface) { continue; @@ -82,13 +83,21 @@ function handleSectionsAdd(iface) { } } if (match === false) { + var vpn_stdservice = uci.get('travelmate', 'global', 'trm_stdvpnservice'); + var vpn_stdiface = uci.get('travelmate', 'global', 'trm_stdvpniface'); var sid = uci.add('travelmate', 'uplink'); + uci.set('travelmate', sid, 'enabled', '1'); uci.set('travelmate', sid, 'device', w_sections[i].device); uci.set('travelmate', sid, 'ssid', w_sections[i].ssid); uci.set('travelmate', sid, 'bssid', w_sections[i].bssid); uci.set('travelmate', sid, 'con_start_expiry', '0'); uci.set('travelmate', sid, 'con_end_expiry', '0'); + if (vpn_stdservice && vpn_stdiface) { + uci.set('travelmate', sid, 'vpn', '1'); + uci.set('travelmate', sid, 'vpnservice', vpn_stdservice); + uci.set('travelmate', sid, 'vpniface', vpn_stdiface); + } } } } |