diff --git a/ESP32_AP-Flasher/data/www/content_cards.json.gz b/ESP32_AP-Flasher/data/www/content_cards.json.gz index 7a009a47..050d8291 100644 Binary files a/ESP32_AP-Flasher/data/www/content_cards.json.gz and b/ESP32_AP-Flasher/data/www/content_cards.json.gz differ diff --git a/ESP32_AP-Flasher/data/www/main.js.gz b/ESP32_AP-Flasher/data/www/main.js.gz index 455c36a3..2af94aac 100644 Binary files a/ESP32_AP-Flasher/data/www/main.js.gz and b/ESP32_AP-Flasher/data/www/main.js.gz differ diff --git a/ESP32_AP-Flasher/wwwroot/content_cards.json b/ESP32_AP-Flasher/wwwroot/content_cards.json index 0c897ade..490b4eea 100644 --- a/ESP32_AP-Flasher/wwwroot/content_cards.json +++ b/ESP32_AP-Flasher/wwwroot/content_cards.json @@ -682,8 +682,8 @@ "key": "fixedchannel", "name": "Fixed Channel", "desc": "What channel should the tag initially join?", - "type": "select", - "options": { + "type": "chanselect", + "chans": { "0": "-Auto", "11": "11", "15": "15", @@ -691,6 +691,21 @@ "25": "25", "26": "26", "27": "27" + }, + "subchans": { + "0": "-Auto", + "100": "100", + "101": "101", + "102": "102", + "103": "103", + "104": "104", + "105": "105", + "200": "200", + "201": "201", + "202": "202", + "203": "203", + "204": "204", + "205": "205" } } ] diff --git a/ESP32_AP-Flasher/wwwroot/main.js b/ESP32_AP-Flasher/wwwroot/main.js index eb12af24..c82fa149 100644 --- a/ESP32_AP-Flasher/wwwroot/main.js +++ b/ESP32_AP-Flasher/wwwroot/main.js @@ -297,6 +297,7 @@ function processTags(tagArray) { (async () => { const localTagmac = tagmac; const data = await getTagtype(element.hwType); + div.dataset.usetemplate = data.usetemplate; if (data.usetemplate != 0) { const template = await getTagtype(data.usetemplate); } @@ -523,6 +524,7 @@ function loadContentCard(mac) { $('#cfglut').value = tagdata.lut; $('#cfginvert').value = tagdata.invert; $('#cfgmore').innerHTML = '▼'; + $('#cfgmac').dataset.ch = tagdata.ch; $('#configbox').showModal(); }) } @@ -969,13 +971,27 @@ function contentselected() { }); break; case 'select': + case 'chanselect': input = document.createElement("select"); - for (const key in element.options) { + let options; + if(element.type == 'chanselect') { + if($('#cfgmac').dataset.ch < 100) { + options = element.chans; + } + else { + options = element.subchans; + } + } + else { + options = element.options + } + + for (const key in options) { const optionElement = document.createElement("option"); optionElement.value = key; - optionElement.text = element.options[key]; - if (element.options[key].substring(0, 1) == "-") { - optionElement.text = element.options[key].substring(1); + optionElement.text = options[key]; + if (options[key].substring(0, 1) == "-") { + optionElement.text = options[key].substring(1); optionElement.selected = true; } else { optionElement.selected = false;