luci-app-travelmate: release 2.4.6-1
authorDirk Brenken <redacted>
Tue, 16 Jun 2026 19:36:15 +0000 (21:36 +0200)
committerDirk Brenken <redacted>
Tue, 16 Jun 2026 19:36:15 +0000 (21:36 +0200)
- sync with base package

Signed-off-by: Dirk Brenken <redacted>
applications/luci-app-travelmate/Makefile
applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/stations.js

index bc77d12c9d10d53b3b444ded94ce6853cf4899b1..1a1ad240a84efc7448eaf17355d5cae6c2f21507 100644 (file)
@@ -6,8 +6,8 @@ include $(TOPDIR)/rules.mk
 LUCI_TITLE:=LuCI support for Travelmate
 LUCI_DEPENDS:=+luci-base +luci-lib-uqr +travelmate
 
-PKG_VERSION:=2.4.5
-PKG_RELEASE:=3
+PKG_VERSION:=2.4.6
+PKG_RELEASE:=1
 PKG_LICENSE:=Apache-2.0
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
 
index f941d22e55b1ff56f99abc146b33dfdadffcc3c5..54d4e631475c89dbff6c961ac6051b267db7a64c 100644 (file)
@@ -39,6 +39,13 @@ function resolveCipher(cipherRaw) {
        return { name: cipherRaw, aes: false };
 }
 
+/*
+       normalize a bssid to upper case for case-insensitive comparison
+*/
+function normBssid(bssid) {
+       return (bssid || '').toUpperCase();
+}
+
 /*
        change the status of travelmate stations
 */
@@ -51,7 +58,7 @@ function handleToggle(sid) {
        t_sections = uci.sections('travelmate', 'uplink');
 
        for (let i = 0; i < t_sections.length; i++) {
-               if (t_sections[i].device === w_device && t_sections[i].ssid === w_ssid && t_sections[i].bssid === w_bssid) {
+               if (t_sections[i].device === w_device && t_sections[i].ssid === w_ssid && normBssid(t_sections[i].bssid) === normBssid(w_bssid)) {
                        value = t_sections[i]['enabled'];
                        value = (value == 0 ? 1 : 0);
                        enabled = (value == 0 ? _('No') : _('Yes'));
@@ -83,7 +90,7 @@ function handleRemove(sid) {
        for (let i = 0; i < t_sections.length; i++) {
                match = false;
                for (let j = 0; j < w_sections.length; j++) {
-                       if (t_sections[i].device === w_sections[j].device && t_sections[i].ssid === w_sections[j].ssid && t_sections[i].bssid === w_sections[j].bssid) {
+                       if (t_sections[i].device === w_sections[j].device && t_sections[i].ssid === w_sections[j].ssid && normBssid(t_sections[i].bssid) === normBssid(w_sections[j].bssid)) {
                                match = true;
                                break;
                        }
@@ -123,7 +130,7 @@ function handleSectionsAdd(iface) {
                }
                match = false;
                for (let j = 0; j < t_sections.length; j++) {
-                       if (w_sections[i].device === t_sections[j].device && w_sections[i].ssid === t_sections[j].ssid && w_sections[i].bssid === t_sections[j].bssid) {
+                       if (w_sections[i].device === t_sections[j].device && w_sections[i].ssid === t_sections[j].ssid && normBssid(w_sections[i].bssid) === normBssid(t_sections[j].bssid)) {
                                match = true;
                                break;
                        }
@@ -158,7 +165,7 @@ function handleSectionsVal(action, section_id, option, value) {
        t_sections = uci.sections('travelmate', 'uplink');
 
        for (let i = 0; i < t_sections.length; i++) {
-               if (t_sections[i].device === w_device && t_sections[i].ssid === w_ssid && t_sections[i].bssid === w_bssid) {
+               if (t_sections[i].device === w_device && t_sections[i].ssid === w_ssid && normBssid(t_sections[i].bssid) === normBssid(w_bssid)) {
                        if (action === 'get') {
                                return t_sections[i][option];
                        } else if (action === 'set') {
@@ -246,7 +253,7 @@ function handleStatus() {
                                                uplinkColor = (vpnStatus === '✔' ? 'rgb(68, 170, 68)' : 'rgb(51, 119, 204)');
                                                for (let i = 0; i < w_sections.length; i++) {
                                                        newUplinkView = document.getElementById('cbi-wireless-' + w_sections[i]['.name']);
-                                                       if (t_device === w_sections[i].device && t_ssid === w_sections[i].ssid && t_bssid === (w_sections[i].bssid || '-')) {
+                                                       if (t_device === w_sections[i].device && t_ssid === w_sections[i].ssid && normBssid(t_bssid) === normBssid(w_sections[i].bssid || '-')) {
                                                                if (oldUplinkView.length === 0 && newUplinkView) {
                                                                        newUplinkView.setAttribute('name', 'uplinkStation');
                                                                        newUplinkView.setAttribute('style', 'text-align: left !important; color: ' + uplinkColor + ' !important;font-weight: bold !important;');
@@ -371,6 +378,10 @@ return view.extend({
                o = s.taboption('wireless', form.Value, 'bssid', _('BSSID'));
                o.datatype = 'macaddr';
                o.readonly = true;
+               o.textvalue = function (section_id) {
+                       const bssid = uci.get('wireless', section_id, 'bssid');
+                       return bssid ? normBssid(bssid) : null;
+               };
 
                o = s.taboption('wireless', form.ListValue, 'encryption', _('Encryption'));
                o.value('sae', _('WPA3 PSK (SAE)'));
@@ -1120,7 +1131,7 @@ return view.extend({
                        }
                        for (let i = 0; i < w_sections.length; i++) {
                                if (w_sections[i].device === device && w_sections[i].ssid === ssid) {
-                                       if (ignore_bssid === '1' || (ignore_bssid === '0' && w_sections[i].bssid === bssid)) {
+                                       if (ignore_bssid === '1' || (ignore_bssid === '0' && normBssid(w_sections[i].bssid) === normBssid(bssid))) {
                                                ui.addNotification(null, E('p', _('Duplicate wireless entry, the uplink station could not be saved.')), 'error');
                                                return ui.hideModal();
                                        }
git clone https://git.99rst.org/PROJECT