GZIPped UI & settings pages.

settings.js for pasting data into HTML.
Reduced simple & classic flash footprint.
Split iro.js and rangetouch.js into separate requests (instead of embedding)
This commit is contained in:
Blaz Kristan 2021-12-06 20:53:09 +01:00
parent 44f9bc5f0e
commit f45b5da71a
19 changed files with 4062 additions and 3559 deletions

View File

@ -113,7 +113,7 @@ function writeHtmlGzipped(sourceFile, resultFile, page) {
console.info("Reading " + sourceFile); console.info("Reading " + sourceFile);
new inliner(sourceFile, function (error, html) { new inliner(sourceFile, function (error, html) {
console.info("Inlined " + html.length + " characters"); console.info("Inlined " + html.length + " characters");
html = filter(html.replace("</head>","<script src=\"iro.js\"></script><script src=\"rangetouch.js\"></script></head>"), "html-minify-ui"); html = filter(html/*.replace("</head>","<script src=\"iro.js\"></script><script src=\"rangetouch.js\"></script></head>")*/, "html-minify-ui");
console.info("Minified to " + html.length + " characters"); console.info("Minified to " + html.length + " characters");
if (error) { if (error) {
@ -164,7 +164,8 @@ const char ${s.name}[] PROGMEM = R"${s.prepend || ""}${filter(str, s.filter)}${
return s.mangle ? s.mangle(chunk) : chunk; return s.mangle ? s.mangle(chunk) : chunk;
} else if (s.method == "gzip") { } else if (s.method == "gzip") {
const buf = fs.readFileSync(srcDir + "/" + s.file); const buf = fs.readFileSync(srcDir + "/" + s.file);
const str = buf.toString('utf-8'); var str = buf.toString('utf-8');
if (s.mangle) str = s.mangle(str);
const zip = zlib.gzipSync(filter(str, s.filter), { level: zlib.constants.Z_BEST_COMPRESSION }); const zip = zlib.gzipSync(filter(str, s.filter), { level: zlib.constants.Z_BEST_COMPRESSION });
const result = hexdump(zip.toString('hex'), true); const result = hexdump(zip.toString('hex'), true);
const chunk = ` const chunk = `
@ -253,8 +254,11 @@ writeChunks(
name: "PAGE_settingsCss", name: "PAGE_settingsCss",
prepend: "=====(<style>", prepend: "=====(<style>",
append: "</style>)=====", append: "</style>)=====",
method: "plaintext", method: "gzip",
filter: "css-minify", filter: "css-minify",
mangle: (str) =>
str
.replace("%%","%")
}, },
{ {
file: "settings.htm", file: "settings.htm",
@ -263,140 +267,134 @@ writeChunks(
append: ")=====", append: ")=====",
method: "plaintext", method: "plaintext",
filter: "html-minify", filter: "html-minify",
mangle: (str) =>
str
.replace("%", "%%")
.replace(/User Interface\<\/button\>\<\/form\>/gms, "User Interface\<\/button\>\<\/form\>%DMXMENU%"),
}, },
{ {
file: "settings_wifi.htm", file: "settings_wifi.htm",
name: "PAGE_settings_wifi", name: "PAGE_settings_wifi",
prepend: "=====(", prepend: "=====(",
append: ")=====", append: ")=====",
method: "plaintext", method: "gzip",
filter: "html-minify", filter: "html-minify",
mangle: (str) => mangle: (str) =>
str str
.replace(/\<link rel="stylesheet".*\>/gms, "") //.replace(/\<link rel="stylesheet".*\>/gms, "")
.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%") //.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%")
.replace( .replace(
/function GetV().*\<\/script\>/gms, /function GetV().*\<\/script\>/gms,
"function GetV() {var d=document;\n" "</script><script src=\"settings.js?p=1\"></script>"
), )
}, },
{ {
file: "settings_leds.htm", file: "settings_leds.htm",
name: "PAGE_settings_leds", name: "PAGE_settings_leds",
prepend: "=====(", prepend: "=====(",
append: ")=====", append: ")=====",
method: "plaintext", method: "gzip",
filter: "html-minify", filter: "html-minify",
mangle: (str) => mangle: (str) =>
str str
.replace(/\<link rel="stylesheet".*\>/gms, "") //.replace(/\<link rel="stylesheet".*\>/gms, "")
.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%") //.replace(/\<style\>.*\<\/style\>/gms, "%SCSS%")
.replace( .replace(
/function GetV().*\<\/script\>/gms, /function GetV().*\<\/script\>/gms,
"function GetV() {var d=document;\n" "</script><script src=\"settings.js?p=2\"></script>"
), )
}, },
{ {
file: "settings_dmx.htm", file: "settings_dmx.htm",
name: "PAGE_settings_dmx", name: "PAGE_settings_dmx",
prepend: "=====(", prepend: "=====(",
append: ")=====", append: ")=====",
method: "plaintext", method: "gzip",
filter: "html-minify", filter: "html-minify",
mangle: (str) => { mangle: (str) =>
const nocss = str str
.replace(/\<link rel="stylesheet".*\>/gms, "") //.replace(/\<link rel="stylesheet".*\>/gms, "")
.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%") //.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%")
.replace( .replace(
/function GetV().*\<\/script\>/gms, /function GetV().*\<\/script\>/gms,
"function GetV() {var d=document;\n" "</script><script src=\"settings.js?p=7\"></script>"
); )
return `
#ifdef WLED_ENABLE_DMX
${nocss}
#else
const char PAGE_settings_dmx[] PROGMEM = R"=====()=====";
#endif
`;
},
}, },
{ {
file: "settings_ui.htm", file: "settings_ui.htm",
name: "PAGE_settings_ui", name: "PAGE_settings_ui",
prepend: "=====(", prepend: "=====(",
append: ")=====", append: ")=====",
method: "plaintext", method: "gzip",
filter: "html-minify", filter: "html-minify",
mangle: (str) => mangle: (str) =>
str str
.replace(/\<link rel="stylesheet".*\>/gms, "") //.replace(/\<link rel="stylesheet".*\>/gms, "")
.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%") //.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%")
.replace( .replace(
/function GetV().*\<\/script\>/gms, /function GetV().*\<\/script\>/gms,
"function GetV() {var d=document;\n" "</script><script src=\"settings.js?p=3\"></script>"
), )
}, },
{ {
file: "settings_sync.htm", file: "settings_sync.htm",
name: "PAGE_settings_sync", name: "PAGE_settings_sync",
prepend: "=====(", prepend: "=====(",
append: ")=====", append: ")=====",
method: "plaintext", method: "gzip",
filter: "html-minify", filter: "html-minify",
mangle: (str) => mangle: (str) =>
str str
.replace(/\<link rel="stylesheet".*\>/gms, "") //.replace(/\<link rel="stylesheet".*\>/gms, "")
.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%") //.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%")
.replace(/function GetV().*\<\/script\>/gms, "function GetV() {\n"), .replace(
/function GetV().*\<\/script\>/gms,
"</script><script src=\"settings.js?p=4\"></script>"
)
}, },
{ {
file: "settings_time.htm", file: "settings_time.htm",
name: "PAGE_settings_time", name: "PAGE_settings_time",
prepend: "=====(", prepend: "=====(",
append: ")=====", append: ")=====",
method: "plaintext", method: "gzip",
filter: "html-minify", filter: "html-minify",
mangle: (str) => mangle: (str) =>
str str
.replace(/\<link rel="stylesheet".*\>/gms, "") //.replace(/\<link rel="stylesheet".*\>/gms, "")
.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%") //.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%")
.replace(/function GetV().*\<\/script\>/gms, "function GetV() {\n"), .replace(
/function GetV().*\<\/script\>/gms,
"</script><script src=\"settings.js?p=5\"></script>"
)
}, },
{ {
file: "settings_sec.htm", file: "settings_sec.htm",
name: "PAGE_settings_sec", name: "PAGE_settings_sec",
prepend: "=====(", prepend: "=====(",
append: ")=====", append: ")=====",
method: "plaintext", method: "gzip",
filter: "html-minify", filter: "html-minify",
mangle: (str) => mangle: (str) =>
str str
.replace(/\<link rel="stylesheet".*\>/gms, "") //.replace(/\<link rel="stylesheet".*\>/gms, "")
.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%") //.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%")
.replace( .replace(
/function GetV().*\<\/script\>/gms, /function GetV().*\<\/script\>/gms,
"function GetV() {var d=document;\n" "</script><script src=\"settings.js?p=6\"></script>"
), )
}, },
{ {
file: "settings_um.htm", file: "settings_um.htm",
name: "PAGE_settings_um", name: "PAGE_settings_um",
prepend: "=====(", prepend: "=====(",
append: ")=====", append: ")=====",
method: "plaintext", method: "gzip",
filter: "html-minify", filter: "html-minify",
mangle: (str) => mangle: (str) =>
str str
.replace(/\<link rel="stylesheet".*\>/gms, "") //.replace(/\<link rel="stylesheet".*\>/gms, "")
.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%") //.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%")
.replace( .replace(
/function GetV().*\<\/script\>/gms, /function GetV().*\<\/script\>/gms,
"function GetV() {var d=document;\n" "</script><script src=\"settings.js?p=8\"></script>"
), )
} }
], ],
"wled00/html_settings.h" "wled00/html_settings.h"
@ -410,7 +408,7 @@ writeChunks(
name: "PAGE_usermod", name: "PAGE_usermod",
prepend: "=====(", prepend: "=====(",
append: ")=====", append: ")=====",
method: "plaintext", method: "gzip",
filter: "html-minify", filter: "html-minify",
mangle: (str) => mangle: (str) =>
str.replace(/fetch\("http\:\/\/.*\/win/gms, 'fetch("/win'), str.replace(/fetch\("http\:\/\/.*\/win/gms, 'fetch("/win'),
@ -444,7 +442,7 @@ const char PAGE_dmxmap[] PROGMEM = R"=====()=====";
name: "PAGE_update", name: "PAGE_update",
prepend: "=====(", prepend: "=====(",
append: ")=====", append: ")=====",
method: "plaintext", method: "gzip",
filter: "html-minify", filter: "html-minify",
}, },
{ {
@ -452,7 +450,7 @@ const char PAGE_dmxmap[] PROGMEM = R"=====()=====";
name: "PAGE_welcome", name: "PAGE_welcome",
prepend: "=====(", prepend: "=====(",
append: ")=====", append: ")=====",
method: "plaintext", method: "gzip",
filter: "html-minify", filter: "html-minify",
}, },
{ {
@ -460,7 +458,7 @@ const char PAGE_dmxmap[] PROGMEM = R"=====()=====";
name: "PAGE_liveview", name: "PAGE_liveview",
prepend: "=====(", prepend: "=====(",
append: ")=====", append: ")=====",
method: "plaintext", method: "gzip",
filter: "html-minify", filter: "html-minify",
}, },
{ {
@ -468,7 +466,7 @@ const char PAGE_dmxmap[] PROGMEM = R"=====()=====";
name: "PAGE_liveviewws", name: "PAGE_liveviewws",
prepend: "=====(", prepend: "=====(",
append: ")=====", append: ")=====",
method: "plaintext", method: "gzip",
filter: "html-minify", filter: "html-minify",
}, },
{ {
@ -476,7 +474,7 @@ const char PAGE_dmxmap[] PROGMEM = R"=====()=====";
name: "PAGE_404", name: "PAGE_404",
prepend: "=====(", prepend: "=====(",
append: ")=====", append: ")=====",
method: "plaintext", method: "gzip",
filter: "html-minify", filter: "html-minify",
}, },
{ {

View File

@ -7,12 +7,39 @@
<meta content="yes" name="apple-mobile-web-app-capable"> <meta content="yes" name="apple-mobile-web-app-capable">
<link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAGACGAAAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAQAAAAEAgGAAAAH/P/YQAAAE1JREFUOI1j/P//PwOxgNGeAUMxE9G6cQCKDWAhpADZ2f8PMjBS3QW08QK20KaZC2gfC9hCnqouoNgARgY7zMxAyNlUdQHlXiAlO2MDAD63EVqNHAe0AAAAAElFTkSuQmCC"/> <link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAGACGAAAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAQAAAAEAgGAAAAH/P/YQAAAE1JREFUOI1j/P//PwOxgNGeAUMxE9G6cQCKDWAhpADZ2f8PMjBS3QW08QK20KaZC2gfC9hCnqouoNgARgY7zMxAyNlUdQHlXiAlO2MDAD63EVqNHAe0AAAAAElFTkSuQmCC"/>
<title>WLED</title> <title>WLED</title>
<script>function feedback(){}</script> <script>
function feedback(){}
var h = document.getElementsByTagName('head')[0];
var l = document.createElement('script');
l.type = 'application/javascript';
l.src = 'iro.js';
l.addEventListener('load', (e) => {
cpick = new iro.ColorPicker("#picker", {
width: 260,
wheelLightness: false,
wheelAngle: 270,
wheelDirection: "clockwise",
layout: [{
component: iro.ui.Wheel,
options: {}
}]
});
cpick.on("input:end", () => {setColor(1);});
cpick.on("color:change", () => {updatePSliders()});
var l = document.createElement('script');
l.type = 'application/javascript';
l.src = 'rangetouch.js';
l.addEventListener('load', (e) => {
ranges = RangeTouch.setup('input[type="range"]', {});
onLoad();
});
setTimeout(function(){h.appendChild(l)},150);
});
h.appendChild(l);
</script>
<link rel="stylesheet" href="index.css"> <link rel="stylesheet" href="index.css">
<script src="iro.js"></script>
<script src="rangetouch.js"></script>
</head> </head>
<body onload="onLoad()"> <body>
<div id="cv" class="overlay">Loading WLED UI...</div> <div id="cv" class="overlay">Loading WLED UI...</div>
<noscript><div class="overlay" style="opacity:1;">Sorry, WLED UI needs JavaScript!</div></noscript> <noscript><div class="overlay" style="opacity:1;">Sorry, WLED UI needs JavaScript!</div></noscript>

View File

@ -18,14 +18,13 @@ var segCount = 0, ledCount = 0, lowestUnused = 0, maxSeg = 0, lSeg = 0;
var pcMode = false, pcModeA = false, lastw = 0; var pcMode = false, pcModeA = false, lastw = 0;
var tr = 7; var tr = 7;
var d = document; var d = document;
const ranges = RangeTouch.setup('input[type="range"]', {});
var palettesData; var palettesData;
var fxdata = []; var fxdata = [];
var pJson = {}, eJson = {}, lJson = {}; var pJson = {}, eJson = {}, lJson = {};
var pN = "", pI = 0, pNum = 0; var pN = "", pI = 0, pNum = 0;
var pmt = 1, pmtLS = 0, pmtLast = 0; var pmt = 1, pmtLS = 0, pmtLast = 0;
var lastinfo = {}; var lastinfo = {};
var ws; var ws, cpick, ranges;
var cfg = { var cfg = {
theme:{base:"dark", bg:{url:""}, alpha:{bg:0.6,tab:0.8}, color:{bg:""}}, theme:{base:"dark", bg:{url:""}, alpha:{bg:0.6,tab:0.8}, color:{bg:""}},
comp :{colors:{picker: true, rgb: false, quick: true, hex: false}, comp :{colors:{picker: true, rgb: false, quick: true, hex: false},
@ -39,17 +38,6 @@ var hol = [
[2024,2,31,2,"https://aircoookie.github.io/easter.png"] [2024,2,31,2,"https://aircoookie.github.io/easter.png"]
]; ];
var cpick = new iro.ColorPicker("#picker", {
width: 260,
wheelLightness: false,
wheelAngle: 270,
wheelDirection: "clockwise",
layout: [{
component: iro.ui.Wheel,
options: {}
}]
});
function handleVisibilityChange() {if (!d.hidden && new Date () - lastUpdate > 3000) requestJson();} function handleVisibilityChange() {if (!d.hidden && new Date () - lastUpdate > 3000) requestJson();}
function sCol(na, col) {d.documentElement.style.setProperty(na, col);} function sCol(na, col) {d.documentElement.style.setProperty(na, col);}
function gId(c) {return d.getElementById(c);} function gId(c) {return d.getElementById(c);}
@ -232,10 +220,6 @@ function onLoad()
for (var i = 0; i < cd.length; i++) cd[i].style.backgroundColor = "rgb(0, 0, 0)"; for (var i = 0; i < cd.length; i++) cd[i].style.backgroundColor = "rgb(0, 0, 0)";
selectSlot(0); selectSlot(0);
updateTablinks(0); updateTablinks(0);
cpick.on("input:end", function() {
setColor(1);
});
cpick.on("color:change", updatePSliders);
pmtLS = localStorage.getItem('wledPmt'); pmtLS = localStorage.getItem('wledPmt');
// Load initial data // Load initial data
@ -244,7 +228,6 @@ function onLoad()
loadFX(()=>{ loadFX(()=>{
loadFXData(); loadFXData();
loadPresets(()=>{ loadPresets(()=>{
//if (isObj(lastinfo) && isEmpty(lastinfo)) loadInfo(requestJson); // if not filled by WS
requestJson(); requestJson();
}); });
}); });
@ -602,41 +585,7 @@ function parseInfo() {
pmt = li.fs.pmt; pmt = li.fs.pmt;
cct = li.leds.cct; cct = li.leds.cct;
} }
/*
function loadInfo(callback=null)
{
var url = (loc?`http://${locip}`:'') + '/json/info';
var useWs = (ws && ws.readyState === WebSocket.OPEN);
if (useWs) {
ws.send('{"v":true}');
return;
}
fetch(url, {
method: 'get'
})
.then(res => {
if (!res.ok) showToast('Could not load Info!', true);
return res.json();
})
.then(json => {
clearErrorToast();
lastinfo = json;
parseInfo();
showNodes();
if (isInfo) populateInfo(json);
reqsLegal = true;
if (!ws && lastinfo.ws > -1) setTimeout(makeWS,500);
})
.catch(function (error) {
showToast(error, true);
console.log(error);
})
.finally(()=>{
if (callback) callback();
updateUI();
});
}
*/
function populateInfo(i) function populateInfo(i)
{ {
var cn=""; var cn="";

View File

@ -21,7 +21,7 @@
border-radius: var(--h); border-radius: var(--h);
font-size: 6vmin; font-size: 6vmin;
height: var(--h); height: var(--h);
width: calc(100% - 40px); width: calc(100%% - 40px);
margin-top: 2vh; margin-top: 2vh;
} }
</style> </style>
@ -31,6 +31,7 @@
<form action="/settings/wifi"><button type="submit">WiFi Setup</button></form> <form action="/settings/wifi"><button type="submit">WiFi Setup</button></form>
<form action="/settings/leds"><button type="submit">LED Preferences</button></form> <form action="/settings/leds"><button type="submit">LED Preferences</button></form>
<form action="/settings/ui"><button type="submit">User Interface</button></form> <form action="/settings/ui"><button type="submit">User Interface</button></form>
%DMXMENU%<!--form action="/settings/dmx"><button type="submit">DMX Output</button></form-->
<form action="/settings/sync"><button type="submit">Sync Interfaces</button></form> <form action="/settings/sync"><button type="submit">Sync Interfaces</button></form>
<form action="/settings/time"><button type="submit">Time & Macros</button></form> <form action="/settings/time"><button type="submit">Time & Macros</button></form>
<form action="/settings/um"><button type="submit">Usermods</button></form> <form action="/settings/um"><button type="submit">Usermods</button></form>

View File

@ -31,7 +31,7 @@ function mMap(){
function S(){GCH(15);GetV();mMap();}function H(){window.open("https://github.com/Aircoookie/WLED/wiki/DMX");}function B(){window.history.back();} function S(){GCH(15);GetV();mMap();}function H(){window.open("https://github.com/Aircoookie/WLED/wiki/DMX");}function B(){window.history.back();}
function GetV(){} function GetV(){}
</script> </script>
<style>@import url("/style.css");</style> <style>@import url("style.css");</style>
</head> </head>
<body onload="S()"> <body onload="S()">
<form id="form_s" name="Sf" method="post"> <form id="form_s" name="Sf" method="post">

View File

@ -71,7 +71,6 @@
if (bquot > 100) {var msg = "Too many LEDs for me to handle!"; if (maxM < 10000) msg += "\n\rConsider using an ESP32."; alert(msg);} if (bquot > 100) {var msg = "Too many LEDs for me to handle!"; if (maxM < 10000) msg += "\n\rConsider using an ESP32."; alert(msg);}
if (d.Sf.checkValidity()) d.Sf.submit(); //https://stackoverflow.com/q/37323914 if (d.Sf.checkValidity()) d.Sf.submit(); //https://stackoverflow.com/q/37323914
} }
function S(){GetV();checkSi();setABL();}
function enABL() function enABL()
{ {
var en = gId('able').checked; var en = gId('able').checked;
@ -451,6 +450,7 @@ ${i+1}:
} }
} }
} }
function S(){GetV();checkSi();setABL();}
function GetV() function GetV()
{ {
//values injected by server while sending HTML //values injected by server while sending HTML

View File

@ -35,7 +35,7 @@ function SetVal(){switch(parseInt(d.Sf.EP.value)){case 5568: d.Sf.DI.value = 556
function S(){GetV();SetVal();} function S(){GetV();SetVal();}
function GetV(){var d=document;} function GetV(){var d=document;}
</script> </script>
<style>@import url("/style.css");</style> <style>@import url("style.css");</style>
</head> </head>
<body onload="S()"> <body onload="S()">
<form id="form_s" name="Sf" method="post" onsubmit="GC()"> <form id="form_s" name="Sf" method="post" onsubmit="GC()">

View File

@ -97,7 +97,7 @@
//values injected by server while sending HTML //values injected by server while sending HTML
} }
</script> </script>
<style>@import url("/style.css");</style> <style>@import url("style.css");</style>
</head> </head>
<body onload="S()"> <body onload="S()">
<form id="form_s" name="Sf" method="post" onsubmit="Wd()"> <form id="form_s" name="Sf" method="post" onsubmit="Wd()">

View File

@ -133,7 +133,7 @@
} }
function GetV() {} function GetV() {}
</script> </script>
<style>@import url("/style.css");</style> <style>@import url("style.css");</style>
</head> </head>
<body onload="S()"> <body onload="S()">

View File

@ -18,7 +18,7 @@
//values injected by server while sending HTML //values injected by server while sending HTML
} }
</script> </script>
<style>@import url("/style.css");</style> <style>@import url("style.css");</style>
</head> </head>
<body onload="GetV()"> <body onload="GetV()">
<form id="form_s" name="Sf" method="post"> <form id="form_s" name="Sf" method="post">

View File

@ -3,7 +3,7 @@ body {
text-align: center; text-align: center;
background: #222; background: #222;
color: #fff; color: #fff;
line-height: 200%%; /* %% because of AsyncWebServer */ line-height: 200%; /* %% because of AsyncWebServer */
margin: 0; margin: 0;
} }
hr { hr {
@ -109,9 +109,9 @@ td {
position: fixed; position: fixed;
text-align: center; text-align: center;
z-index: 5; z-index: 5;
transform: translateX(-50%%); /* %% because of AsyncWebServer */ transform: translateX(-50%); /* %% because of AsyncWebServer */
max-width: 90%%; /* %% because of AsyncWebServer */ max-width: 90%; /* %% because of AsyncWebServer */
left: 50%%; /* %% because of AsyncWebServer */ left: 50%; /* %% because of AsyncWebServer */
} }
#toast.show { #toast.show {

View File

@ -324,6 +324,7 @@ void serveMessage(AsyncWebServerRequest* request, uint16_t code, const String& h
String settingsProcessor(const String& var); String settingsProcessor(const String& var);
String dmxProcessor(const String& var); String dmxProcessor(const String& var);
void serveSettings(AsyncWebServerRequest* request, bool post = false); void serveSettings(AsyncWebServerRequest* request, bool post = false);
void serveSettingsJS(AsyncWebServerRequest* request);
//ws.cpp //ws.cpp
void handleWs(); void handleWs();

View File

@ -6,7 +6,15 @@
*/ */
// Autogenerated from wled00/data/usermod.htm, do not edit!! // Autogenerated from wled00/data/usermod.htm, do not edit!!
const char PAGE_usermod[] PROGMEM = R"=====(<!DOCTYPE html><html><body>No usermod custom web page set.</body></html>)====="; const uint16_t PAGE_usermod_length = 81;
const uint8_t PAGE_usermod[] PROGMEM = {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xb3, 0x51, 0x74, 0xf1, 0x77, 0x0e,
0x89, 0x0c, 0x70, 0x55, 0xc8, 0x28, 0xc9, 0xcd, 0xb1, 0xb3, 0x81, 0x90, 0x49, 0xf9, 0x29, 0x95,
0x76, 0x7e, 0xf9, 0x0a, 0xa5, 0xc5, 0xa9, 0x45, 0xb9, 0xf9, 0x29, 0x0a, 0xc9, 0xa5, 0xc5, 0x25,
0xf9, 0xb9, 0x0a, 0xe5, 0xa9, 0x49, 0x0a, 0x05, 0x89, 0xe9, 0xa9, 0x0a, 0xc5, 0xa9, 0x25, 0x7a,
0x36, 0xfa, 0x60, 0x55, 0x36, 0xfa, 0x60, 0x2d, 0x00, 0x1e, 0x93, 0x65, 0xc7, 0x48, 0x00, 0x00,
0x00
};
// Autogenerated from wled00/data/msg.htm, do not edit!! // Autogenerated from wled00/data/msg.htm, do not edit!!
@ -35,70 +43,308 @@ const char PAGE_dmxmap[] PROGMEM = R"=====()=====";
#endif #endif
// Autogenerated from wled00/data/update.htm, do not edit!! // Autogenerated from wled00/data/update.htm, do not edit!!
const char PAGE_update[] PROGMEM = R"=====(<!DOCTYPE html><html><head><meta content="width=device-width" name="viewport"> const uint16_t PAGE_update_length = 734;
<title>WLED Update</title><script> const uint8_t PAGE_update[] PROGMEM = {
function B(){window.history.back()}function U(){document.getElementById("uf").style.display="none",document.getElementById("msg").style.display="block"} 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0x85, 0x54, 0xef, 0x6b, 0xdc, 0x46,
</script><style> 0x10, 0xfd, 0xae, 0xbf, 0x62, 0xb3, 0xa6, 0x60, 0x43, 0x4e, 0xb2, 0xef, 0x48, 0x29, 0x3a, 0x49,
.bt{background:#333;color:#fff;font-family:Verdana,sans-serif;border:.3ch solid #333;display:inline-block;font-size:20px;margin:8px;margin-top:12px}input[type=file]{font-size:16px}body{font-family:Verdana,sans-serif;text-align:center;background:#222;color:#fff;line-height:200%}#msg{display:none} 0xa5, 0xae, 0xfd, 0x21, 0x50, 0x88, 0x21, 0x49, 0x4b, 0x28, 0xa5, 0xac, 0xb4, 0x23, 0x69, 0xb8,
</style></head><body><h2>WLED Software Update</h2><form method="POST" 0xd5, 0xae, 0xb2, 0x3b, 0xba, 0xf3, 0xf5, 0xf0, 0xff, 0x9e, 0xd1, 0xca, 0x76, 0x9c, 0x94, 0xd2,
action="/update" id="uf" enctype="multipart/form-data" onsubmit="U()"> 0x2f, 0x62, 0x7f, 0xcc, 0x7b, 0x33, 0xf3, 0xe6, 0xad, 0x8a, 0x57, 0x37, 0xef, 0x7e, 0xfd, 0xf0,
Installed version: 0.13.1-bl5<br>Download the latest binary: <a 0xe9, 0xee, 0x56, 0xf4, 0x34, 0x98, 0xaa, 0x78, 0xfc, 0x82, 0xd2, 0x55, 0x31, 0x00, 0x29, 0xd1,
href="https://github.com/Aircoookie/WLED/releases" target="_blank"><img 0x38, 0x4b, 0x60, 0xa9, 0x94, 0x07, 0xd4, 0xd4, 0x97, 0x1a, 0xf6, 0xd8, 0xc0, 0x2a, 0x6e, 0xa4,
src="https://img.shields.io/github/release/Aircoookie/WLED.svg?style=flat-square"> 0xb0, 0x6a, 0x80, 0x52, 0xee, 0x11, 0x0e, 0xa3, 0xf3, 0x24, 0xab, 0xa4, 0x20, 0x24, 0x03, 0xd5,
</a><br><input type="file" class="bt" name="update" required><br><input 0x1f, 0xbf, 0xdd, 0xde, 0x88, 0x8f, 0xa3, 0x56, 0x04, 0x45, 0xb6, 0x1c, 0x15, 0xa1, 0xf1, 0x38,
type="submit" class="bt" value="Update!"><br><button type="button" class="bt" 0x52, 0x95, 0xb4, 0x93, 0x6d, 0x08, 0x9d, 0x15, 0xd7, 0xe7, 0x17, 0xa7, 0x03, 0x5a, 0xed, 0x0e,
onclick="B()">Back</button></form><div id="msg"><b>Updating...</b><br> 0x69, 0x8f, 0x81, 0x9c, 0x3f, 0xa6, 0xb5, 0x6a, 0x76, 0xe7, 0x17, 0x0f, 0xcf, 0x21, 0x1f, 0x39,
Please do not close or refresh the page :)</div></body></html>)====="; 0x44, 0xbb, 0x66, 0x1a, 0xb8, 0x82, 0xb4, 0x03, 0xba, 0x35, 0x30, 0x2f, 0xaf, 0x8f, 0x6f, 0xf5,
0xb9, 0x9c, 0x5a, 0x79, 0x91, 0x06, 0x3a, 0x1a, 0x48, 0x35, 0x86, 0xd1, 0xa8, 0x63, 0x29, 0xad,
0xb3, 0x20, 0x5f, 0xff, 0x27, 0x64, 0x08, 0xdd, 0xbf, 0x31, 0xb5, 0x71, 0xcd, 0x4e, 0x3e, 0x24,
0x45, 0xf6, 0x58, 0x62, 0x11, 0x03, 0xaa, 0x24, 0xad, 0xe9, 0x34, 0x57, 0xd4, 0x79, 0x37, 0x59,
0x9d, 0x9f, 0x6d, 0x36, 0x9b, 0x6d, 0xe3, 0x8c, 0xf3, 0xf9, 0x59, 0xdb, 0xb6, 0xdb, 0x96, 0x95,
0x59, 0xb5, 0x6a, 0x40, 0x73, 0xcc, 0x7f, 0x07, 0xaf, 0x95, 0x55, 0xaf, 0x83, 0xb2, 0x61, 0x15,
0xc0, 0x63, 0xbb, 0x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3, 0x02, 0x5a, 0x36, 0xdf, 0x80, 0x12, 0x67, 0x1b, 0x83, 0xcd, 0xae,
0x94, 0xd7, 0xf3, 0x0c, 0xae, 0xd9, 0x4f, 0x45, 0xb6, 0xc4, 0xb1, 0x2b, 0xe6, 0x61, 0x55, 0x85,
0xc6, 0x7d, 0x9c, 0xe8, 0xfc, 0x08, 0x99, 0xb1, 0x8a, 0x19, 0xd0, 0x76, 0x69, 0x9a, 0x72, 0x6c,
0xcc, 0x93, 0xdc, 0x45, 0x35, 0x84, 0x76, 0xc2, 0x3a, 0xe2, 0x04, 0x8e, 0x37, 0xce, 0x73, 0x07,
0xad, 0x87, 0xd0, 0xc7, 0x81, 0x8d, 0xaa, 0x03, 0x91, 0x5f, 0x14, 0x19, 0xf3, 0x31, 0xf7, 0xe2,
0xb5, 0x2c, 0xfe, 0xb7, 0xbe, 0x00, 0xc6, 0x3c, 0x8c, 0x02, 0xcd, 0x04, 0x00, 0x00
};
// Autogenerated from wled00/data/welcome.htm, do not edit!! // Autogenerated from wled00/data/welcome.htm, do not edit!!
const char PAGE_welcome[] PROGMEM = R"=====(<!DOCTYPE html><html><head><meta charset="utf-8"><meta const uint16_t PAGE_welcome_length = 1528;
content="width=device-width" name="viewport"><meta name="theme-color" const uint8_t PAGE_welcome[] PROGMEM = {
content="#222222"><title>Welcome!</title><style> 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0x95, 0x56, 0x5b, 0x93, 0xaa, 0x3a,
body{font-family:Verdana,Helvetica,sans-serif;text-align:center;background-color:#222;margin:0;color:#fff}button{outline:0;cursor:pointer;padding:8px;margin:10px;width:230px;text-transform:uppercase;font-family:helvetica;font-size:19px;background-color:#333;color:#fff;border:0 solid #fff;border-radius:25px}img{width:950px;max-width:82%;image-rendering:pixelated;image-rendering:crisp-edges;margin:4vh 0 0 0;animation:fi 1s}@keyframes fi{from{opacity:0}to{opacity:1}}.main{animation:fi 1.5s .7s both} 0x16, 0x7e, 0xef, 0x5f, 0xc1, 0x76, 0xea, 0xd4, 0x79, 0x70, 0x77, 0x73, 0x13, 0x51, 0xdb, 0xee,
</style></head><body><img alt="" 0x19, 0xc5, 0x4b, 0x7b, 0x03, 0x6f, 0x78, 0x7b, 0x0b, 0x10, 0x20, 0x08, 0x04, 0x93, 0x80, 0x97,
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAG0AAAAfCAMAAADazLOuAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABLUExURQAAAAB81gCU/zKq///mo7sWMN8bO+ZIYtZaAP9rAP+HMsCiG+TAIOnMS0KqNU7KPnLUZOrq6v///4CAgGhoaL+/v6CgoExMTAAAAAlm4O8AAAAZdFJOU////////////////////////////////wABNAq3AAAACXBIWXMAAA7DAAAOwwHHb6hkAAACN0lEQVRIS73VjVLCMBAEYIr8CYKkrdj3f1J37zaXFCpTO+piaDgbPq9px9VQ0qyrvKj4q6m0Zr1h+M7xF1zRmnWzqV9/0d2jttGotO1uv9dUObwej5oqp7fzWVPl8n69aprzoOUUbbvdIbV3OLwitXc6vSG1d7m8I3feSEN0j2CeNbOY4MxigjOLCc4sZsTV2l1cCyy4wIILLLjAxtykltq2rbTU+qi01N5rXNO2leaFORoija2l5MM5a02ac9Ya16Sk5tgaPrUpjZub0BL6YqSxKwbH77XUUmSkJXSl8QtaMuyJhq5maL5nTKVpZC13VmtMpTFT2g4vJjTuGfMzzXftiUZnhdtgb1xofvypRon5TjNnxYN9zJo6K5ruSIzQtGuVZn0x91rKvdHBvm39E7SyZ4y06Gz8BDBFKzsXmhcwyfsGZ9VpbhoiCinaxPNmGWmWWrNU2jB0q6HvOhN1JUtCixQtp2g51ZVUXIPS2RMAD++T2nY/DrDjOMDO4wC7jmNYj3d73nrXug8Yt9uNB8xNU1cKNXWlUFNXCjV1pZhGTE83m2vWfYf/NGj4Bg1zu5JD3/MnH5ZWfLOksbmGWGjgXMN5/C2GXYGFFW9Nmtle6Xut0Gm+JsayCj8z0nhjGvYJzVf4aSzmNYsr+u7Q2JIdoX3YOQjOslmsW1jJ3120nE9gfo79hTaNdcsqVR610lvO47pllae9ReZ805zKo2a3iaY5c75pTmVCA6dJ5H7N0sr/asPwBehb7ifEhusRAAAAAElFTkSuQmCC"> 0xae, 0xfe, 0xef, 0x13, 0x74, 0xf7, 0xd4, 0x3e, 0x75, 0x1e, 0xa6, 0x4e, 0x2c, 0x21, 0xf9, 0x92,
<div class="main"><h1>Welcome to WLED!</h1><h3> 0xb5, 0xd6, 0xb7, 0x92, 0xb8, 0x3e, 0xdb, 0x3f, 0x7a, 0x96, 0xb1, 0xde, 0xcf, 0xfb, 0x42, 0xc8,
Thank you for installing my application!</h3><b>Next steps:</b><br><br> 0x92, 0xf8, 0xbd, 0xfd, 0xeb, 0x09, 0x81, 0xf7, 0xde, 0x4e, 0x20, 0x03, 0x82, 0x1b, 0x02, 0x42,
Connect the module to your local WiFi here!<br><button 0x21, 0x7b, 0xab, 0xe4, 0xcc, 0x7f, 0x6e, 0x54, 0x7e, 0xa1, 0x4f, 0x2e, 0x4e, 0x19, 0x4c, 0x39,
onclick='window.location.href="/settings/wifi"'>WiFi settings</button><br><i> 0x7c, 0x46, 0x1e, 0x0b, 0xdf, 0x3c, 0x58, 0x20, 0x17, 0x3e, 0xdf, 0x07, 0x15, 0x21, 0x05, 0x09,
Just trying this out in AP mode?</i><br><button 0x7c, 0xab, 0x14, 0x08, 0x9e, 0x33, 0x4c, 0xd8, 0xb7, 0xcd, 0x03, 0x65, 0x21, 0x4c, 0xe0, 0xb3,
onclick='window.location.href="/sliders"'>To the controls!</button><br></div> 0x8b, 0x63, 0x4c, 0x2a, 0xbf, 0xb9, 0xf9, 0x97, 0x72, 0x6f, 0x7c, 0x2d, 0x43, 0x2c, 0x86, 0xef,
</body></html>)====="; 0x5b, 0x18, 0xbb, 0x38, 0x81, 0x3f, 0xda, 0xe2, 0x63, 0xdc, 0xa6, 0xec, 0xca, 0x5f, 0x4f, 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0x6b, 0x99, 0x00, 0x0b, 0x11, 0x15,
0xb8, 0xf6, 0xf1, 0xa4, 0x84, 0xce, 0xbc, 0x24, 0x05, 0xff, 0xdd, 0x16, 0xd1, 0xfb, 0x3f, 0x0b,
0xcf, 0x55, 0x09, 0x12, 0xca, 0x03, 0xaf, 0xf1, 0x3d, 0xb7, 0x52, 0xee, 0x09, 0x8e, 0xe9, 0x8f,
0xbf, 0xc6, 0x16, 0xf9, 0xb6, 0xf3, 0xcd, 0x17, 0x1f, 0x65, 0x5d, 0xbc, 0xff, 0x07, 0xf9, 0x2f,
0xec, 0xfa, 0x82, 0xd2, 0x99, 0x08, 0x00, 0x00
};
// Autogenerated from wled00/data/liveview.htm, do not edit!! // Autogenerated from wled00/data/liveview.htm, do not edit!!
const char PAGE_liveview[] PROGMEM = R"=====(<!DOCTYPE html><html><head><meta name="viewport" const uint16_t PAGE_liveview_length = 547;
content="width=device-width,initial-scale=1,minimum-scale=1"><meta const uint8_t PAGE_liveview[] PROGMEM = {
charset="utf-8"><meta name="theme-color" content="#222222"><title> 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0x95, 0x53, 0x4d, 0x6f, 0xdb, 0x30,
WLED Live Preview</title><style> 0x0c, 0xbd, 0xe7, 0x57, 0x78, 0x2a, 0x5a, 0x48, 0x88, 0x63, 0x3b, 0xc5, 0xba, 0x8f, 0xf8, 0xe3,
body{margin:0}#canv{background:#000;filter:brightness(175%);width:100%;height:100%;position:absolute} 0xb0, 0xb5, 0x87, 0x02, 0x05, 0xd6, 0x43, 0x81, 0x61, 0x18, 0x76, 0x50, 0x24, 0xc6, 0xd6, 0x2a,
</style></head><body><div id="canv"><script> 0x4b, 0x81, 0x4c, 0xb9, 0x08, 0xd2, 0xfc, 0xf7, 0xc9, 0x76, 0xd2, 0x62, 0xc0, 0x30, 0xa0, 0x3e,
update();var tmout=null;function update(){if(document.hidden)return clearTimeout(tmout),void(tmout=setTimeout(update,250));fetch("/json/live").then(t=>(t.ok||(clearTimeout(tmout),tmout=setTimeout(update,2500)),t.json())).then(t=>{var e="linear-gradient(90deg,",u=t.leds.length;for(i=0;i<u;i++){var o=t.leds[i];o.length>6&&(o=o.substring(2)),e+="#"+o,i<u-1&&(e+=",")}e+=")",document.getElementById("canv").style.background=e,clearTimeout(tmout),tmout=setTimeout(update,40)}).catch((function(t){clearTimeout(tmout),tmout=setTimeout(update,2500)}))} 0xc8, 0x94, 0xf8, 0xf4, 0x48, 0x3e, 0x52, 0xc5, 0xbb, 0xeb, 0x6f, 0x5f, 0x1f, 0x7e, 0xdc, 0xdf,
</script></body></html>)====="; 0x44, 0x0d, 0xb6, 0xba, 0x2a, 0x8e, 0x2b, 0x70, 0x59, 0x15, 0x2d, 0x20, 0x8f, 0x0c, 0x6f, 0xa1,
0x24, 0xbd, 0x82, 0xa7, 0xad, 0x75, 0x48, 0xa2, 0x99, 0xb0, 0x06, 0xc1, 0x60, 0x49, 0x9e, 0x94,
0xc4, 0xa6, 0x94, 0xd0, 0x2b, 0x01, 0x8b, 0x71, 0x13, 0x2b, 0xa3, 0x50, 0x71, 0xbd, 0xe8, 0x04,
0xd7, 0x50, 0x2e, 0xe3, 0x36, 0x1c, 0xb4, 0xbe, 0x3d, 0xed, 0xc9, 0x91, 0x73, 0x26, 0x1a, 0xee,
0x3a, 0x08, 0x1c, 0x1e, 0x37, 0x8b, 0x4f, 0xe4, 0xaf, 0x50, 0xd8, 0x40, 0x0b, 0x0b, 0x61, 0xb5,
0x75, 0x24, 0x7a, 0x09, 0x76, 0x76, 0x39, 0x7e, 0x01, 0x8a, 0x0a, 0x35, 0x54, 0xb3, 0xef, 0x77,
0x37, 0xd7, 0xd1, 0x9d, 0xea, 0x21, 0xba, 0x77, 0x30, 0xa4, 0x57, 0xa4, 0x93, 0xa7, 0xe8, 0x70,
0x37, 0x00, 0xd6, 0x56, 0xee, 0xf6, 0x2d, 0x77, 0xb5, 0x32, 0xab, 0xec, 0x70, 0x26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 0xd8, 0x2b, 0xdb, 0x7e, 0x28, 0x2e, 0xf4, 0x51, 0x2b,
0x13, 0xe8, 0x16, 0xb5, 0xe3, 0x52, 0x85, 0x32, 0xe8, 0xe7, 0x4c, 0x42, 0x1d, 0x93, 0xd8, 0x97,
0x98, 0x68, 0x90, 0x5d, 0x58, 0x4c, 0x8d, 0x4d, 0xbe, 0xb1, 0x8e, 0xaa, 0x32, 0xcb, 0x55, 0xe1,
0x73, 0x35, 0x9f, 0xb3, 0xf1, 0xbe, 0x3d, 0x82, 0x7e, 0xaa, 0x5f, 0xb9, 0x3d, 0x22, 0xab, 0x0f,
0x17, 0x17, 0xd4, 0x96, 0x36, 0xe9, 0xfc, 0xba, 0x43, 0xa7, 0x4c, 0x4d, 0x2f, 0x43, 0x0a, 0x30,
0x0f, 0xd3, 0x41, 0xe6, 0x36, 0x0e, 0x04, 0x8b, 0x65, 0x80, 0x0c, 0x07, 0x31, 0x61, 0x87, 0xe1,
0xcf, 0x48, 0xfc, 0xa2, 0x63, 0x0d, 0x78, 0xa3, 0x61, 0x30, 0xbf, 0xec, 0x6e, 0x25, 0x9d, 0x9a,
0xc3, 0x92, 0xb1, 0x7f, 0xc9, 0xeb, 0x64, 0x94, 0x10, 0xbf, 0x45, 0x88, 0xf7, 0x19, 0x3b, 0xb0,
0x44, 0xf0, 0x41, 0x5e, 0x7a, 0x6a, 0x24, 0x45, 0xb6, 0x7f, 0xb3, 0x9a, 0x07, 0xc6, 0xc6, 0x79,
0x9a, 0x86, 0xa5, 0x48, 0xa7, 0x51, 0x4a, 0xc7, 0x17, 0xf9, 0x07, 0xe3, 0xed, 0x60, 0x85, 0xa7,
0x03, 0x00, 0x00
};
// Autogenerated from wled00/data/liveviewws.htm, do not edit!! // Autogenerated from wled00/data/liveviewws.htm, do not edit!!
const char PAGE_liveviewws[] PROGMEM = R"=====(<!DOCTYPE html><html><head><meta name="viewport" const uint16_t PAGE_liveviewws_length = 683;
content="width=device-width,initial-scale=1,minimum-scale=1"><meta const uint8_t PAGE_liveviewws[] PROGMEM = {
charset="utf-8"><meta name="theme-color" content="#222222"><title> 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0x75, 0x54, 0xeb, 0x6f, 0xd3, 0x30,
WLED Live Preview</title><style> 0x10, 0xff, 0xde, 0xbf, 0x22, 0x78, 0xa2, 0x8b, 0xd5, 0x34, 0x6d, 0x91, 0x78, 0xe5, 0x51, 0x04,
body{margin:0}#canv{background:#000;filter:brightness(175%);width:100%;height:100%;position:absolute} 0xac, 0x48, 0x4c, 0x13, 0x9b, 0x34, 0xd0, 0x84, 0x10, 0x1f, 0xdc, 0xf8, 0x9a, 0x58, 0x4b, 0xec,
</style></head><body><div id="canv"><script> 0x62, 0x5f, 0x1a, 0x55, 0x55, 0xfe, 0x77, 0xce, 0x4d, 0x37, 0x1e, 0x82, 0x7c, 0xc8, 0xc3, 0xbe,
function updatePreview(e){var n="linear-gradient(90deg,",o=e.length;for(i=0;i<o;i++){var t=e[i];t.length>6&&(t=t.substring(2)),n+="#"+t,i<o-1&&(n+=",")}n+=")",document.getElementById("canv").style.background=n}function getLiveJson(e){try{var n=JSON.parse(e.data);n&&n.leds&&requestAnimationFrame((function(){updatePreview(n.leds)}))}catch(e){console.error("Live-Preview ws error:",e)}}var ws=top.window.ws;ws&&ws.readyState===WebSocket.OPEN?(console.info("Use top WS for peek"),ws.send("{'lv':true}")):(console.info("Peek ws opening"),(ws=new WebSocket("ws://"+document.location.host+"/ws")).onopen=function(){console.info("Peek WS opened"),ws.send("{'lv':true}")}),ws.addEventListener("message",getLiveJson) 0xbb, 0xdf, 0xe3, 0xce, 0xc9, 0x9e, 0x5c, 0x5c, 0xbf, 0xff, 0xfc, 0xf5, 0x66, 0x15, 0x54, 0xd8,
</script></body></html>)====="; 0xd4, 0xcb, 0xec, 0x74, 0x07, 0x21, 0x97, 0x59, 0x03, 0x28, 0x02, 0x2d, 0x1a, 0xc8, 0xd9, 0x4e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e4, 0x80, 0x9c, 0x6c, 0xe8, 0x40, 0x88,
0x12, 0x58, 0xf4, 0x5b, 0x73, 0xb9, 0x9f, 0xf8, 0x61, 0x9c, 0xb3, 0xd9, 0x30, 0xec, 0xb3, 0xe3,
0x3f, 0xe3, 0x27, 0xdc, 0x5a, 0x16, 0x55, 0x49, 0x04, 0x00, 0x00
};
// Autogenerated from wled00/data/404.htm, do not edit!! // Autogenerated from wled00/data/404.htm, do not edit!!
const char PAGE_404[] PROGMEM = R"=====(<!DOCTYPE html><html><head><meta charset="utf-8"><meta const uint16_t PAGE_404_length = 868;
content="width=device-width" name="viewport"><meta name="theme-color" const uint8_t PAGE_404[] PROGMEM = {
content="#222222"><title>Not found</title><style> 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0x65, 0x54, 0x5b, 0x73, 0xaa, 0x3a,
body{font-family:Verdana,Helvetica,sans-serif;text-align:center;background-color:#222;margin:0;color:#fff}img{width:400px;max-width:50%;image-rendering:pixelated;image-rendering:crisp-edges;margin:25px 0 -10px 0}button{outline:0;cursor:pointer;padding:8px;margin:10px;width:230px;text-transform:uppercase;font-family:helvetica;font-size:19px;background-color:#333;color:#fff;border:0 solid #fff;border-radius:25px} 0x14, 0x7e, 0xef, 0xaf, 0xe0, 0x78, 0xe6, 0xcc, 0x7e, 0x68, 0x2d, 0xa8, 0xd8, 0x2a, 0xa2, 0x33,
</style></head><body><img alt="" 0x01, 0x51, 0xec, 0xc5, 0x7a, 0xa3, 0xd6, 0xbe, 0x05, 0x12, 0x21, 0x15, 0x08, 0x4d, 0x82, 0x62,
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAbUExURQAAAAB81gCU/zKq/////9bW1oCAgGhoaAAAAGPLX8AAAAAJdFJOU///////////AFNPeBIAAAAJcEhZcwAADsAAAA7AAWrWiQkAAACdSURBVDhPxc9bDoUgEANQebP/FUuHMjBGY/B+3EYR7RH0qC/ZBc6HwCljgHO+xZIVSI2sYgHaG7EBWh8jWoxTrCBFdDJ+BD4lbIHxAcz8APAVLTsrZE4eQD5qzt3cAFTYokC4YCN9Gybgu4yAQtBFLQXHuHABA7JMeOEC/E0W5uy9gv4vo5QHK2i7yq2C8UABM4HmL+CSTXCTF1DrCX6+Gp9zB5dsAAAAAElFTkSuQmCC"> 0x3b, 0xfd, 0xef, 0x3b, 0x40, 0xf7, 0x9c, 0xce, 0xec, 0x35, 0x03, 0x2b, 0xf9, 0x56, 0xd6, 0x7d,
<h1>404 Not Found</h1><b>Akemi does not know where you are headed...</b><br><br> 0x25, 0xe6, 0x3f, 0xe3, 0x27, 0x7b, 0xb3, 0x5b, 0x38, 0x4a, 0x24, 0x92, 0x78, 0x64, 0x7e, 0xff,
<button onclick='window.location.href="/sliders"'>Back to controls</button> 0x31, 0x44, 0x23, 0x33, 0xc1, 0x02, 0x2a, 0x41, 0x04, 0x19, 0xc7, 0x62, 0xd8, 0xc8, 0xc5, 0xbe,
</body></html>)====="; 0xd9, 0x6b, 0x7c, 0xa3, 0x17, 0x01, 0x4d, 0x05, 0x4e, 0x25, 0x7c, 0x22, 0x48, 0x44, 0x43, 0x84,
0x8f, 0x24, 0xc0, 0xcd, 0x6a, 0xd3, 0x50, 0x52, 0x98, 0xe0, 0x61, 0xe3, 0x48, 0xf0, 0x29, 0xa3,
0x4c, 0xfc, 0xd1, 0xa9, 0x51, 0x11, 0xe1, 0x04, 0x37, 0x03, 0x1a, 0x53, 0xd6, 0xf8, 0x61, 0xe6,
0xdf, 0x76, 0x45, 0xf2, 0xac, 0x20, 0x22, 0xc6, 0xa3, 0x39, 0x15, 0xca, 0x9e, 0xe6, 0x29, 0x32,
0xd5, 0x1a, 0x30, 0xb9, 0x38, 0x4b, 0x76, 0xe1, 0x53, 0x74, 0xfe, 0xdc, 0x4b, 0xb5, 0xe6, 0x1e,
0x26, 0x24, 0x3e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xff, 0xc3, 0xea, 0xa2, 0x2a, 0x5b,
0xe0, 0xc4, 0x93, 0xcd, 0x61, 0x9d, 0x2f, 0x13, 0xdb, 0x6e, 0x8c, 0x2e, 0xcc, 0xa8, 0x35, 0xd2,
0x35, 0x5d, 0x29, 0xef, 0xeb, 0xa4, 0xbe, 0xaf, 0x12, 0x31, 0xfd, 0x11, 0x38, 0xe0, 0x84, 0x28,
0x88, 0x62, 0xae, 0xa4, 0x52, 0x76, 0x48, 0xe9, 0x49, 0x39, 0x45, 0x98, 0x61, 0xe5, 0x4c, 0x73,
0x05, 0x4a, 0x5e, 0x0e, 0x08, 0x46, 0xd7, 0xd7, 0xd7, 0xa6, 0xea, 0x4b, 0x0d, 0x56, 0x7d, 0x17,
0x66, 0x7d, 0x19, 0x14, 0x9a, 0x06, 0x31, 0x09, 0x0e, 0xc3, 0x5f, 0x27, 0x92, 0x22, 0x7a, 0xba,
0x8e, 0x69, 0x00, 0x05, 0xa1, 0xe9, 0x75, 0xc4, 0xf0, 0x7e, 0xd8, 0x50, 0xb9, 0x1c, 0x43, 0xcc,
0x78, 0xe3, 0xd7, 0xc8, 0x92, 0xb3, 0xab, 0x08, 0xaa, 0x94, 0x6f, 0x09, 0xa3, 0x31, 0x97, 0xe6,
0x2a, 0x13, 0xd2, 0x96, 0x5a, 0x8f, 0x9f, 0x5a, 0xbd, 0x6a, 0xbf, 0x01, 0x22, 0xc8, 0xb7, 0x64,
0xeb, 0x04, 0x00, 0x00
};
// Autogenerated from wled00/data/favicon.ico, do not edit!! // Autogenerated from wled00/data/favicon.ico, do not edit!!

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@
*/ */
// version code in format yymmddb (b = daily build) // version code in format yymmddb (b = daily build)
#define VERSION 2112031 #define VERSION 2112061
//uncomment this if you have a "my_config.h" file you'd like to use //uncomment this if you have a "my_config.h" file you'd like to use
//#define WLED_USE_MY_CONFIG //#define WLED_USE_MY_CONFIG

View File

@ -65,11 +65,21 @@ void initServer()
#ifdef WLED_ENABLE_WEBSOCKETS #ifdef WLED_ENABLE_WEBSOCKETS
server.on("/liveview", HTTP_GET, [](AsyncWebServerRequest *request){ server.on("/liveview", HTTP_GET, [](AsyncWebServerRequest *request){
request->send_P(200, "text/html", PAGE_liveviewws); if (handleIfNoneMatchCacheHeader(request)) return;
AsyncWebServerResponse *response = request->beginResponse_P(200, "text/html", PAGE_liveviewws, PAGE_liveviewws_length);
response->addHeader(F("Content-Encoding"),"gzip");
setStaticContentCacheHeaders(response);
request->send(response);
//request->send_P(200, "text/html", PAGE_liveviewws);
}); });
#else #else
server.on("/liveview", HTTP_GET, [](AsyncWebServerRequest *request){ server.on("/liveview", HTTP_GET, [](AsyncWebServerRequest *request){
request->send_P(200, "text/html", PAGE_liveview); if (handleIfNoneMatchCacheHeader(request)) return;
AsyncWebServerResponse *response = request->beginResponse_P(200, "text/html", PAGE_liveview, PAGE_liveview_length);
response->addHeader(F("Content-Encoding"),"gzip");
setStaticContentCacheHeaders(response);
request->send(response);
//request->send_P(200, "text/html", PAGE_liveview);
}); });
#endif #endif
@ -164,7 +174,12 @@ void initServer()
}); });
server.on("/u", HTTP_GET, [](AsyncWebServerRequest *request){ server.on("/u", HTTP_GET, [](AsyncWebServerRequest *request){
request->send_P(200, "text/html", PAGE_usermod); if (handleIfNoneMatchCacheHeader(request)) return;
AsyncWebServerResponse *response = request->beginResponse_P(200, "text/html", PAGE_usermod, PAGE_usermod_length);
response->addHeader(F("Content-Encoding"),"gzip");
setStaticContentCacheHeaders(response);
request->send(response);
//request->send_P(200, "text/html", PAGE_usermod);
}); });
server.on("/url", HTTP_GET, [](AsyncWebServerRequest *request){ server.on("/url", HTTP_GET, [](AsyncWebServerRequest *request){
@ -221,7 +236,11 @@ void initServer()
//init ota page //init ota page
#ifndef WLED_DISABLE_OTA #ifndef WLED_DISABLE_OTA
server.on("/update", HTTP_GET, [](AsyncWebServerRequest *request){ server.on("/update", HTTP_GET, [](AsyncWebServerRequest *request){
request->send_P(200, "text/html", PAGE_update); AsyncWebServerResponse *response = request->beginResponse_P(200, "text/html", PAGE_update, PAGE_update_length);
response->addHeader(F("Content-Encoding"),"gzip");
setStaticContentCacheHeaders(response);
request->send(response);
//request->send_P(200, "text/html", PAGE_update);
}); });
server.on("/update", HTTP_POST, [](AsyncWebServerRequest *request){ server.on("/update", HTTP_POST, [](AsyncWebServerRequest *request){
@ -303,7 +322,11 @@ void initServer()
if(espalexa.handleAlexaApiCall(request)) return; if(espalexa.handleAlexaApiCall(request)) return;
#endif #endif
if(handleFileRead(request, request->url())) return; if(handleFileRead(request, request->url())) return;
request->send_P(404, "text/html", PAGE_404); AsyncWebServerResponse *response = request->beginResponse_P(404, "text/html", PAGE_404, PAGE_404_length);
response->addHeader(F("Content-Encoding"),"gzip");
setStaticContentCacheHeaders(response);
request->send(response);
//request->send_P(404, "text/html", PAGE_404);
}); });
} }
@ -408,21 +431,22 @@ void serveMessage(AsyncWebServerRequest* request, uint16_t code, const String& h
String settingsProcessor(const String& var) String settingsProcessor(const String& var)
{ {
/*
if (var == "CSS") { if (var == "CSS") {
char buf[SETTINGS_STACK_BUF_SIZE]; char buf[SETTINGS_STACK_BUF_SIZE];
buf[0] = 0; buf[0] = 0;
getSettingsJS(optionType, buf); getSettingsJS(optionType, buf);
obuf = buf;
oappend(SET_F("}</script>"));
return String(buf); return String(buf);
} }
*/
#ifdef WLED_ENABLE_DMX #ifdef WLED_ENABLE_DMX
if (var == "DMXMENU") { if (var == "DMXMENU") {
return String(F("<form action=/settings/dmx><button type=submit>DMX Output</button></form>")); return String(F("<form action=/settings/dmx><button type=submit>DMX Output</button></form>"));
} }
#endif #endif
if (var == "SCSS") return String(FPSTR(PAGE_settingsCss)); //if (var == "SCSS") return String(FPSTR(PAGE_settingsCss));
return String(); return String();
} }
@ -447,13 +471,32 @@ String dmxProcessor(const String& var)
} }
void serveSettingsJS(AsyncWebServerRequest* request)
{
char buf[SETTINGS_STACK_BUF_SIZE+37];
buf[0] = 0;
byte subPage = request->arg(F("p")).toInt();
if (!subPage || subPage>8) {
strcpy_P(buf, PSTR("alert('Settings for this request are not implemented.');"));
request->send(501, "application/javascript", buf);
return;
}
strcat_P(buf,PSTR("function GetV(){var d=document;"));
getSettingsJS(subPage, buf+strlen(buf)); // this may overflow by 35bytes!!!
strcat_P(buf,PSTR("}"));
request->send(200, "application/javascript", buf);
}
void serveSettings(AsyncWebServerRequest* request, bool post) void serveSettings(AsyncWebServerRequest* request, bool post)
{ {
byte subPage = 0; byte subPage = 0;
const String& url = request->url(); const String& url = request->url();
if (url.indexOf("sett") >= 0) if (url.indexOf("sett") >= 0)
{ {
if (url.indexOf("wifi") > 0) subPage = 1; if (url.indexOf(".js") > 0) subPage = 254;
else if (url.indexOf(".css") > 0) subPage = 253;
else if (url.indexOf("wifi") > 0) subPage = 1;
else if (url.indexOf("leds") > 0) subPage = 2; else if (url.indexOf("leds") > 0) subPage = 2;
else if (url.indexOf("ui") > 0) subPage = 3; else if (url.indexOf("ui") > 0) subPage = 3;
else if (url.indexOf("sync") > 0) subPage = 4; else if (url.indexOf("sync") > 0) subPage = 4;
@ -502,17 +545,24 @@ void serveSettings(AsyncWebServerRequest* request, bool post)
optionType = subPage; optionType = subPage;
AsyncWebServerResponse *response;
switch (subPage) switch (subPage)
{ {
case 1: request->send_P(200, "text/html", PAGE_settings_wifi, settingsProcessor); break; case 1: response = request->beginResponse_P(200, "text/html", PAGE_settings_wifi, PAGE_settings_wifi_length); break;
case 2: request->send_P(200, "text/html", PAGE_settings_leds, settingsProcessor); break; case 2: response = request->beginResponse_P(200, "text/html", PAGE_settings_leds, PAGE_settings_leds_length); break;
case 3: request->send_P(200, "text/html", PAGE_settings_ui , settingsProcessor); break; case 3: response = request->beginResponse_P(200, "text/html", PAGE_settings_ui, PAGE_settings_ui_length); break;
case 4: request->send_P(200, "text/html", PAGE_settings_sync, settingsProcessor); break; case 4: response = request->beginResponse_P(200, "text/html", PAGE_settings_sync, PAGE_settings_sync_length); break;
case 5: request->send_P(200, "text/html", PAGE_settings_time, settingsProcessor); break; case 5: response = request->beginResponse_P(200, "text/html", PAGE_settings_time, PAGE_settings_time_length); break;
case 6: request->send_P(200, "text/html", PAGE_settings_sec , settingsProcessor); break; case 6: response = request->beginResponse_P(200, "text/html", PAGE_settings_sec, PAGE_settings_sec_length); break;
case 7: request->send_P(200, "text/html", PAGE_settings_dmx , settingsProcessor); break; case 7: response = request->beginResponse_P(200, "text/html", PAGE_settings_dmx, PAGE_settings_dmx_length); break;
case 8: request->send_P(200, "text/html", PAGE_settings_um , settingsProcessor); break; case 8: response = request->beginResponse_P(200, "text/html", PAGE_settings_um, PAGE_settings_um_length); break;
case 255: request->send_P(200, "text/html", PAGE_welcome); break; case 253: response = request->beginResponse_P(200, "text/css", PAGE_settingsCss, PAGE_settingsCss_length); break;
default: request->send_P(200, "text/html", PAGE_settings , settingsProcessor); case 254: serveSettingsJS(request); return;
case 255: response = request->beginResponse_P(200, "text/html", PAGE_welcome, PAGE_welcome_length); break;
default: request->send_P(200, "text/html", PAGE_settings, settingsProcessor); return;
//default: response = request->beginResponse_P(200, "text/html", PAGE_settings, PAGE_settings_length); break;
} }
response->addHeader(F("Content-Encoding"),"gzip");
setStaticContentCacheHeaders(response);
request->send(response);
} }

View File

@ -600,6 +600,4 @@ void getSettingsJS(byte subPage, char* dest)
oappendi(usermods.getModCount()); oappendi(usermods.getModCount());
oappend(";"); oappend(";");
} }
oappend(SET_F("}</script>"));
} }