Regenerate html_settings.h
This commit is contained in:
parent
9e8aadb750
commit
04b4ef6d85
@ -470,7 +470,7 @@ class Animated_Staircase : public Usermod {
|
|||||||
// first run: reading from cfg.json
|
// first run: reading from cfg.json
|
||||||
DEBUG_PRINTLN(F(" config loaded."));
|
DEBUG_PRINTLN(F(" config loaded."));
|
||||||
} else {
|
} else {
|
||||||
// changing paramters from settings page
|
// changing parameters from settings page
|
||||||
DEBUG_PRINTLN(F(" config (re)loaded."));
|
DEBUG_PRINTLN(F(" config (re)loaded."));
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
if ((oldUseUSSensorTop != useUSSensorTop) ||
|
if ((oldUseUSSensorTop != useUSSensorTop) ||
|
||||||
|
@ -260,7 +260,7 @@ class UsermodTemperature : public Usermod {
|
|||||||
temperaturePin = newTemperaturePin;
|
temperaturePin = newTemperaturePin;
|
||||||
DEBUG_PRINTLN(F(" config loaded."));
|
DEBUG_PRINTLN(F(" config loaded."));
|
||||||
} else {
|
} else {
|
||||||
// changing paramters from settings page
|
// changing parameters from settings page
|
||||||
if (newTemperaturePin != temperaturePin) {
|
if (newTemperaturePin != temperaturePin) {
|
||||||
// deallocate pin and release memory
|
// deallocate pin and release memory
|
||||||
delete oneWire;
|
delete oneWire;
|
||||||
|
@ -648,7 +648,7 @@ class FourLineDisplayUsermod : public Usermod {
|
|||||||
type = newType;
|
type = newType;
|
||||||
DEBUG_PRINTLN(F(" config loaded."));
|
DEBUG_PRINTLN(F(" config loaded."));
|
||||||
} else {
|
} else {
|
||||||
// changing paramters from settings page
|
// changing parameters from settings page
|
||||||
if (sclPin!=newScl || sdaPin!=newSda || type!=newType) {
|
if (sclPin!=newScl || sdaPin!=newSda || type!=newType) {
|
||||||
if (type != NONE) delete (static_cast<U8X8*>(u8x8));
|
if (type != NONE) delete (static_cast<U8X8*>(u8x8));
|
||||||
pinManager.deallocatePin(sclPin);
|
pinManager.deallocatePin(sclPin);
|
||||||
|
@ -31,12 +31,8 @@ input {
|
|||||||
font-family: Verdana, sans-serif;
|
font-family: Verdana, sans-serif;
|
||||||
border: 0.5ch solid #333;
|
border: 0.5ch solid #333;
|
||||||
}
|
}
|
||||||
input[type="text"] {
|
|
||||||
font-size: medium;
|
|
||||||
}
|
|
||||||
input[type="number"] {
|
input[type="number"] {
|
||||||
width: 4em;
|
width: 4em;
|
||||||
font-size: medium;
|
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
}
|
}
|
||||||
input[type="number"].xxl {
|
input[type="number"].xxl {
|
||||||
@ -51,17 +47,8 @@ input[type="number"].med {
|
|||||||
input[type="number"].small {
|
input[type="number"].small {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
}
|
}
|
||||||
select {
|
|
||||||
margin: 2px;
|
|
||||||
font-size: medium;
|
|
||||||
}
|
|
||||||
input[type="checkbox"] {
|
input[type="checkbox"] {
|
||||||
/* Double-sized Checkboxes */
|
transform: scale(1.5);
|
||||||
-ms-transform: scale(2); /* IE */
|
|
||||||
-moz-transform: scale(2); /* FF */
|
|
||||||
-webkit-transform: scale(2); /* Safari and Chrome */
|
|
||||||
-o-transform: scale(2); /* Opera */
|
|
||||||
transform: scale(2);
|
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
select {
|
select {
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Autogenerated from wled00/data/style.css, do not edit!!
|
// Autogenerated from wled00/data/style.css, do not edit!!
|
||||||
const char PAGE_settingsCss[] PROGMEM = R"=====(<style>body{font-family:Verdana,sans-serif;text-align:center;background:#222;color:#fff;line-height:200%;margin:0}hr{border-color:#666}button{background:#333;color:#fff;font-family:Verdana,sans-serif;border:.3ch solid #333;display:inline-block;font-size:20px;margin:8px;margin-top:12px;cursor:pointer}.helpB{text-align:left;position:absolute;width:60px}input{background:#333;color:#fff;font-family:Verdana,sans-serif;border:.5ch solid #333}input[type=number]{width:4em}select{background:#333;color:#fff;font-family:Verdana,sans-serif;border:.5ch solid #333}td{padding:2px}.d5{width:4.5em!important}</style>)=====";
|
const char PAGE_settingsCss[] PROGMEM = R"=====(<style>body{font-family:Verdana,sans-serif;text-align:center;background:#222;color:#fff;line-height:200%%;margin:0}hr{border-color:#666}button{background:#333;color:#fff;font-family:Verdana,sans-serif;border:.3ch solid #333;display:inline-block;font-size:20px;margin:8px;margin-top:12px;cursor:pointer}.helpB{text-align:left;position:absolute;width:60px}input{background:#333;color:#fff;font-family:Verdana,sans-serif;border:.5ch solid #333}input[type=number]{width:4em;margin:2px}input[type=number].xxl{width:100px}input[type=number].big{width:85px}input[type=number].med{width:55px}input[type=number].small{width:40px}input[type=checkbox]{transform:scale(1.5);margin-right:10px}select{background:#333;color:#fff;font-family:Verdana,sans-serif;border:.5ch solid #333}td{padding:2px}.d5{width:4.5em!important}</style>)=====";
|
||||||
|
|
||||||
|
|
||||||
// Autogenerated from wled00/data/settings.htm, do not edit!!
|
// Autogenerated from wled00/data/settings.htm, do not edit!!
|
||||||
@ -394,7 +394,7 @@ type="submit">Save & Reboot</button></form></body></html>)=====";
|
|||||||
// Autogenerated from wled00/data/settings_um.htm, do not edit!!
|
// Autogenerated from wled00/data/settings_um.htm, do not edit!!
|
||||||
const char PAGE_settings_um[] PROGMEM = R"=====(<!DOCTYPE html><html><head lang="en"><meta charset="utf-8"><meta
|
const char PAGE_settings_um[] PROGMEM = R"=====(<!DOCTYPE html><html><head lang="en"><meta charset="utf-8"><meta
|
||||||
name="viewport" content="width=500"><title>Usermod Settings</title><script>
|
name="viewport" content="width=500"><title>Usermod Settings</title><script>
|
||||||
var owner,locip,urows,d=document,umCfg={},pins=[6,7,8,9,10,11],pinO=["rsvd","rsvd","rsvd","rsvd","rsvd","rsvd"],loc=!1,numM=0;function gId(e){return d.getElementById(e)}function isO(e){return e&&"object"==typeof e&&!Array.isArray(e)}function H(){window.open("https://github.com/Aircoookie/WLED/wiki/Settings#usermod-settings")}function B(){window.open("/settings","_self")}function S(){"file:"==window.location.protocol&&(loc=!0,(locip=localStorage.getItem("locIp"))||(locip=prompt("File Mode. Please enter WLED IP!"),localStorage.setItem("locIp",locip))),GetV(),numM>0||locip?ldS():gId("um").innerHTML="No Usermods installed."}function check(e,n){var o=e.name.replace("[]","").substr(-3);if("number"==e.type&&"pin"==o.substr(0,3))for(var i=0;i<pins.length;i++)if(n!=pinO[i]){if(e.value==pins[i]||e.value<-1||e.value>39){e.style.color="red";break}e.style.color=e.value>33?"orange":"#fff"}}function getPins(e){if(isO(e))for(const[o,i]of Object.entries(e))if(isO(i))owner=o,getPins(i);else if("pin"==o.replace("[]","").substr(-3))if(Array.isArray(i))for(var n=0;n<i.length;n++)i[n]>=0&&(pins.push(i[n]),pinO.push(owner));else i>=0&&(pins.push(i),pinO.push(owner));else if(Array.isArray(i))for(n=0;n<i.length;n++)getPins(i[n])}function addField(e,n,o,i=!1){if(isO(o))for(const[n,i]of Object.entries(o))addField(e,n,i);else if(Array.isArray(o))for(var t=0;t<o.length;t++)addField(e,n,o[t],!0);else{var r,s;switch(typeof o){case"boolean":r="checkbox",s=o?'checked value="on"':"";break;case"number":r="number",s=`value="${parseInt(o,10)}"`;break;case"string":default:r="text",s=`value="${o}"`}"checkbox"==r&&(urows+=`<input type="hidden" name="${e}_${n}${i?"[]":""}" value="off">`),urows+=`${n}: <input type="${r}" name="${e}_${n}${i?"[]":""}" ${s} oninput="check(this,'${e}')"><br>`}}function ldS(){fetch((loc?"http://"+locip:"")+"/cfg.json",{method:"get"}).then(e=>(e.ok||(gId("lserr").style.display="inline"),e.json())).then(e=>{if(umCfg=e.um,getPins(e),urows="",isO(umCfg))for(const[e,n]of Object.entries(umCfg))urows+=`<hr><h3>${e}</h3>`,addField(e,"unknown",n);""===urows&&(urows="Usermods configuration not found.<br>Press <i>Save</i> to initialize defaults."),gId("um").innerHTML=urows}).catch((function(e){gId("lserr").style.display="inline",console.log(e)}))}function svS(e){e.preventDefault(),console.log(d.Sf),d.Sf.checkValidity()&&d.Sf.submit()}function GetV() {var d=document;
|
var owner,locip,urows,d=document,umCfg={},pins=[6,7,8,9,10,11],pinO=["rsvd","rsvd","rsvd","rsvd","rsvd","rsvd"],loc=!1,numM=0;function gId(e){return d.getElementById(e)}function isO(e){return e&&"object"==typeof e&&!Array.isArray(e)}function H(){window.open("https://github.com/Aircoookie/WLED/wiki/Settings#usermod-settings")}function B(){window.open("/settings","_self")}function S(){"file:"==window.location.protocol&&(loc=!0,(locip=localStorage.getItem("locIp"))||(locip=prompt("File Mode. Please enter WLED IP!"),localStorage.setItem("locIp",locip))),GetV(),numM>0||locip?ldS():gId("um").innerHTML="No Usermods installed."}function isF(e){return e===+e&&e!==(0|e)}function isI(e){return e===+e&&e===(0|e)}function check(e,n){var i=e.name.replace("[]","").substr(-3);if("number"==e.type&&"pin"==i.substr(0,3))for(var s=0;s<pins.length;s++)if(n!=pinO[s]){if(e.value==pins[s]||e.value<-1||e.value>39){e.style.color="red";break}e.style.color=e.value>33?"orange":"#fff"}}function getPins(e){if(isO(e))for(const[i,s]of Object.entries(e))if(isO(s))owner=i,getPins(s);else if("pin"==i.replace("[]","").substr(-3))if(Array.isArray(s))for(var n=0;n<s.length;n++)s[n]>=0&&(pins.push(s[n]),pinO.push(owner));else s>=0&&(pins.push(s),pinO.push(owner));else if(Array.isArray(s))for(n=0;n<s.length;n++)getPins(s[n])}function addField(e,n,i,s=!1){if(isO(i))for(const[s,t]of Object.entries(i))"unknown"===n||e.includes(":")?addField(e,s,t):addField(e+":"+n,s,t);else if(Array.isArray(i))for(var t=0;t<i.length;t++)addField(e,n,i[t],!0);else{var o,r;switch(typeof i){case"boolean":o="checkbox",r=i?'checked value="true"':"";break;case"number":r=`value="${i}"`,isF(i)?(r+=' step="0.01" class="xxl"',o="float"):("pin"===n.substr(-3)?r+=' max="39" min="-1" class="small"':r+=' class="big"',o="int");break;default:o="text",r=`value="${i}" style="width:150px;"`}e.includes(":")&&(urows+=e.substr(e.indexOf(":")+1)),urows+=` ${n}: `,"checkbox"==o?urows+=`<input type="hidden" name="${e}:${n}${s?"[]":""}" value="false">`:s||(urows+=`<input type="hidden" name="${e}:${n}${s?"[]":""}" value="${o}">`),urows+=`<input type="${"float"===o||"int"===o?"number":o}" name="${e}:${n}${s?"[]":""}" ${r} oninput="check(this,'${e.substr(e.indexOf(":")+1)}')"><br>`}}function ldS(){fetch((loc?"http://"+locip:"")+"/cfg.json",{method:"get"}).then(e=>(e.ok||(gId("lserr").style.display="inline"),e.json())).then(e=>{if(umCfg=e.um,getPins(e),urows="",isO(umCfg))for(const[e,n]of Object.entries(umCfg))urows+=`<hr><h3>${e}</h3>`,addField(e,"unknown",n);""===urows&&(urows="Usermods configuration not found.<br>Press <i>Save</i> to initialize defaults."),gId("um").innerHTML=urows}).catch((function(e){gId("lserr").style.display="inline",console.log(e)}))}function svS(e){e.preventDefault(),console.log(d.Sf),d.Sf.checkValidity()&&d.Sf.submit()}function GetV() {var d=document;
|
||||||
%CSS%%SCSS%</head><body onload="S()"><form
|
%CSS%%SCSS%</head><body onload="S()"><form
|
||||||
id="form_s" name="Sf" method="post" onsubmit="svS(event)"><div class="toprow">
|
id="form_s" name="Sf" method="post" onsubmit="svS(event)"><div class="toprow">
|
||||||
<div class="helpB"><button type="button" onclick="H()">?</button></div><button
|
<div class="helpB"><button type="button" onclick="H()">?</button></div><button
|
||||||
|
Loading…
Reference in New Issue
Block a user