|
|
|
|
@@ -167,7 +167,7 @@ const char PAGE_settings_dmx[] PROGMEM = R"=====()=====";
|
|
|
|
|
// Autogenerated from wled00/data/settings_ui.htm, do not edit!!
|
|
|
|
|
const char PAGE_settings_ui[] PROGMEM = R"=====(<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport"
|
|
|
|
|
content="width=500"><title>UI Settings</title><script>
|
|
|
|
|
var initial_ds,initial_st,d=document,sett=null,l={comp:{labels:"Show button labels",colors:{LABEL:"Color selection methods",picker:"Color Wheel",rgb:"RGB sliders",quick:"Quick color selectors",hex:"HEX color input"},pcmbot:"Show bottom tab bar in PC mode"},theme:{alpha:{bg:"Background opacity",tab:"Button opacity"},bg:{url:"BG image URL"},color:{bg:"BG HEX color"}}};function gId(e){return d.getElementById(e)}function isObject(e){return e&&"object"==typeof e&&!Array.isArray(e)}function set(e,i,t){for(var n=i,l=e.split("_"),s=l.length,o=0;o<s-1;o++){var a=l[o];n[a]||(n[a]={}),n=n[a]}n[l[s-1]]=t}function addRec(e,t="",n=null){var l="";for(i in e){var s=t+(t?"_":"")+i;if(isObject(e[i]))n&&n[i]&&n[i].LABEL&&(l+=`<h3>${n[i].LABEL}</h3>`),l+=addRec(e[i],s,n?n[i]:null);else{var o=s;if(n&&n[i]?o=n[i]:e[i+"LABEL"]&&(o=e[i+"LABEL"]),i.indexOf("LABEL")>0)continue;var a=typeof e[i];gId(s)?("boolean"===a?gId(s).checked=e[i]:gId(s).value=e[i],gId(s).previousElementSibling.matches(".l")&&(gId(s).previousElementSibling.innerHTML=o)):"boolean"===a?l+=`${o}: <input class="agi cb" type="checkbox" id=${s} ${e[i]?"checked":""}><br>`:"number"===a?l+=`${o}: <input class="agi" type="number" id=${s} value=${e[i]}><br>`:"string"===a&&(l+=`${o}:<br><input class="agi" id=${s} value=${e[i]}><br>`)}}return l}function genForm(e){var i;i=addRec(e,"",l),gId("gen").innerHTML=i}function GetLS(){(sett=localStorage.getItem("wledUiCfg"))||(gId("lserr").style.display="inline");try{sett=JSON.parse(sett)}catch(e){sett={},gId("lserr").style.display="inline",gId("lserr").innerHTML="⚠ Settings JSON parsing failed. ("+e+")"}genForm(sett),gId("dm").checked="light"===gId("theme_base").value}function SetLS(){for(var e=d.querySelectorAll(".agi"),i=0;i<e.length;i++){var t=e[i],n=t.classList.contains("cb")?t.checked:t.value;set(t.id,sett,n),console.log(`${t.id} set to ${n}`)}try{localStorage.setItem("wledUiCfg",JSON.stringify(sett)),gId("lssuc").style.display="inline"}catch(t){gId("lssuc").style.display="none",gId("lserr").style.display="inline",gId("lserr").innerHTML="⚠ Settings JSON saving failed. ("+t+")"}}function Save(){SetLS(),d.Sf.DS.value==initial_ds&&d.Sf.ST.checked==initial_st||d.Sf.submit()}function S(){GetV(),initial_ds=d.Sf.DS.value,initial_st=d.Sf.ST.checked,GetLS()}function H(){window.open("https://github.com/Aircoookie/WLED/wiki/Settings#user-interface-settings")}function B(){window.open("/settings","_self")}function UI(){gId("idonthateyou").style.display=gId("dm").checked?"inline":"none";var e=gId("theme_base");e&&(e.value=gId("dm").checked?"light":"dark")}function GetV() {var d=document;
|
|
|
|
|
var initial_ds,initial_st,d=document,sett=null,l={comp:{labels:"Show button labels",colors:{LABEL:"Color selection methods",picker:"Color Wheel",rgb:"RGB sliders",quick:"Quick color selectors",hex:"HEX color input"},pcmbot:"Show bottom tab bar in PC mode",pid:"Show preset IDs"},theme:{alpha:{bg:"Background opacity",tab:"Button opacity"},bg:{url:"BG image URL"},color:{bg:"BG HEX color"}}};function gId(e){return d.getElementById(e)}function isObject(e){return e&&"object"==typeof e&&!Array.isArray(e)}function set(e,i,t){for(var n=i,l=e.split("_"),s=l.length,o=0;o<s-1;o++){var r=l[o];n[r]||(n[r]={}),n=n[r]}n[l[s-1]]=t}function addRec(e,t="",n=null){var l="";for(i in e){var s=t+(t?"_":"")+i;if(isObject(e[i]))n&&n[i]&&n[i].LABEL&&(l+=`<h3>${n[i].LABEL}</h3>`),l+=addRec(e[i],s,n?n[i]:null);else{var o=s;if(n&&n[i]?o=n[i]:e[i+"LABEL"]&&(o=e[i+"LABEL"]),i.indexOf("LABEL")>0)continue;var r=typeof e[i];gId(s)?("boolean"===r?gId(s).checked=e[i]:gId(s).value=e[i],gId(s).previousElementSibling.matches(".l")&&(gId(s).previousElementSibling.innerHTML=o)):"boolean"===r?l+=`${o}: <input class="agi cb" type="checkbox" id=${s} ${e[i]?"checked":""}><br>`:"number"===r?l+=`${o}: <input class="agi" type="number" id=${s} value=${e[i]}><br>`:"string"===r&&(l+=`${o}:<br><input class="agi" id=${s} value=${e[i]}><br>`)}}return l}function genForm(e){var i;i=addRec(e,"",l),gId("gen").innerHTML=i}function GetLS(){(sett=localStorage.getItem("wledUiCfg"))||(gId("lserr").style.display="inline");try{sett=JSON.parse(sett)}catch(e){sett={},gId("lserr").style.display="inline",gId("lserr").innerHTML="⚠ Settings JSON parsing failed. ("+e+")"}genForm(sett),gId("dm").checked="light"===gId("theme_base").value}function SetLS(){for(var e=d.querySelectorAll(".agi"),i=0;i<e.length;i++){var t=e[i],n=t.classList.contains("cb")?t.checked:t.value;set(t.id,sett,n),console.log(`${t.id} set to ${n}`)}try{localStorage.setItem("wledUiCfg",JSON.stringify(sett)),gId("lssuc").style.display="inline"}catch(t){gId("lssuc").style.display="none",gId("lserr").style.display="inline",gId("lserr").innerHTML="⚠ Settings JSON saving failed. ("+t+")"}}function Save(){SetLS(),d.Sf.DS.value==initial_ds&&d.Sf.ST.checked==initial_st||d.Sf.submit()}function S(){GetV(),initial_ds=d.Sf.DS.value,initial_st=d.Sf.ST.checked,GetLS()}function H(){window.open("https://github.com/Aircoookie/WLED/wiki/Settings#user-interface-settings")}function B(){window.open("/settings","_self")}function UI(){gId("idonthateyou").style.display=gId("dm").checked?"inline":"none";var e=gId("theme_base");e&&(e.value=gId("dm").checked?"light":"dark")}function GetV() {var d=document;
|
|
|
|
|
%CSS%%SCSS%</head><body onload="S()"><form
|
|
|
|
|
id="form_s" name="Sf" method="post"><div
|
|
|
|
|
style="position:sticky;top:0;background-color:#222"><div class="helpB"><button
|
|
|
|
|
@@ -185,12 +185,13 @@ You will need to set them again if using a different browser, device or WLED IP
|
|
|
|
|
<br>Refresh the main UI to apply changes.</i><br><div id="gen">
|
|
|
|
|
Loading settings...</div><h3>UI Appearance</h3><span class="l"></span>: <input
|
|
|
|
|
type="checkbox" id="comp_labels" class="agi cb"><br><span class="l"></span>:
|
|
|
|
|
<input type="checkbox" id="comp_pcmbot" class="agi cb"><br>I hate dark mode:
|
|
|
|
|
<input type="checkbox" id="dm" onchange="UI()"><br><span id="idonthateyou"
|
|
|
|
|
style="display:none"><i>Why would you? </i>🥺<br></span><span class="l">
|
|
|
|
|
</span>: <input type="number" min="0.0" max="1.0" step="0.01"
|
|
|
|
|
id="theme_alpha_tab" class="agi"><br><span class="l"></span>: <input
|
|
|
|
|
type="number" min="0.0" max="1.0" step="0.01" id="theme_alpha_bg" class="agi">
|
|
|
|
|
<input type="checkbox" id="comp_pcmbot" class="agi cb"><br><span class="l">
|
|
|
|
|
</span>: <input type="checkbox" id="comp_pid" class="agi cb"><br>
|
|
|
|
|
I hate dark mode: <input type="checkbox" id="dm" onchange="UI()"><br><span
|
|
|
|
|
id="idonthateyou" style="display:none"><i>Why would you? </i>🥺<br>
|
|
|
|
|
</span><span class="l"></span>: <input type="number" min="0.0" max="1.0"
|
|
|
|
|
step="0.01" id="theme_alpha_tab" class="agi"><br><span class="l"></span>: <input
|
|
|
|
|
type="number" min="0.0" max="1.0" step="0.01" id="theme_alpha_bg" class="agi">
|
|
|
|
|
<br><span class="l"></span>: <input id="theme_color_bg" maxlength="9"
|
|
|
|
|
class="agi"><br><span class="l">BG image URL</span>: <input id="theme_bg_url"
|
|
|
|
|
class="agi"> <input id="theme_base" class="agi" style="display:none"><hr><button
|
|
|
|
|
@@ -219,7 +220,7 @@ type="number" min="1" max="65535" class="d5" required><br>Receive <input
|
|
|
|
|
type="checkbox" name="RB">Brightness, <input type="checkbox" name="RC">
|
|
|
|
|
Color, and <input type="checkbox" name="RX">Effects<br>
|
|
|
|
|
Send notifications on direct change: <input type="checkbox" name="SD"><br>
|
|
|
|
|
Send notifications on button press: <input type="checkbox" name="SB"><br>
|
|
|
|
|
Send notifications on button press or IR: <input type="checkbox" name="SB"><br>
|
|
|
|
|
Send Alexa notifications: <input type="checkbox" name="SA"><br>
|
|
|
|
|
Send Philips Hue change notifications: <input type="checkbox" name="SH"><br>
|
|
|
|
|
Send Macro notifications: <input type="checkbox" name="SM"><br>
|
|
|
|
|
|