mirror of
https://github.com/wled/WLED.git
synced 2025-07-23 10:46:33 +00:00
Added configuration backup/restore.
Fixed save dialog compile error.
This commit is contained in:
parent
dbd3bd50df
commit
bf94febb11
@ -76,10 +76,15 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<a class="btn" href="/presets.json?download" target="download-frame">Backup presets</a><br>
|
<a class="btn" href="/presets.json?download" target="download-frame">Backup presets</a><br>
|
||||||
<div id="presets">Restore presets:<input type="file" name="data" accept=".json"> <input type="button" value="Upload" onclick="uploadFile(d.Sf.data,'/presets.json');"><br></div>
|
<div id="presets">Restore presets:<input type="file" name="data" accept=".json"> <input type="button" value="Upload" onclick="uploadFile(d.Sf.data,'/presets.json');"><br></div>
|
||||||
|
<a class="btn" href="/cfg.json?download" target="download-frame">Backup configuration</a><br>
|
||||||
|
<div id="presets">Restore configuration:<input type="file" name="data2" accept=".json"> <input type="button" value="Upload" onclick="uploadFile(d.Sf.data2,'/cfg.json');"><br></div>
|
||||||
|
<div style="color: #f21;">WARNING!<br>Restoring presets/configuration will OVERWRITE current presets/configuration.<br>
|
||||||
|
Incorrect configuration may require factory reset or re-flashing of ESP.</div>
|
||||||
<hr>
|
<hr>
|
||||||
<h3>Software Update</h3>
|
<h3>Software Update</h3>
|
||||||
<button type="button" onclick="U()">Manual OTA Update</button><br>
|
<button type="button" onclick="U()">Manual OTA Update</button><br>
|
||||||
Enable ArduinoOTA: <input type="checkbox" name="AO"><br>
|
Enable ArduinoOTA: <input type="checkbox" name="AO"><br>
|
||||||
|
<hr>
|
||||||
<h3>About</h3>
|
<h3>About</h3>
|
||||||
<a href="https://github.com/Aircoookie/WLED/" target="_blank">WLED</a> version ##VERSION##<!-- Autoreplaced from package.json --><br><br>
|
<a href="https://github.com/Aircoookie/WLED/" target="_blank">WLED</a> version ##VERSION##<!-- Autoreplaced from package.json --><br><br>
|
||||||
<a href="https://github.com/Aircoookie/WLED/wiki/Contributors-and-credits" target="_blank">Contributors, dependencies and special thanks</a><br>
|
<a href="https://github.com/Aircoookie/WLED/wiki/Contributors-and-credits" target="_blank">Contributors, dependencies and special thanks</a><br>
|
||||||
|
@ -376,10 +376,7 @@ void updateFSInfo() {
|
|||||||
|
|
||||||
//Un-comment any file types you need
|
//Un-comment any file types you need
|
||||||
String getContentType(AsyncWebServerRequest* request, String filename){
|
String getContentType(AsyncWebServerRequest* request, String filename){
|
||||||
if(request->hasArg("download")) {
|
if(request->hasArg("download")) return "application/octet-stream";
|
||||||
request->addHeader(F("Content-Disposition"), F("Attachment"));
|
|
||||||
return "application/octet-stream";
|
|
||||||
}
|
|
||||||
else if(filename.endsWith(".htm")) return "text/html";
|
else if(filename.endsWith(".htm")) return "text/html";
|
||||||
else if(filename.endsWith(".html")) return "text/html";
|
else if(filename.endsWith(".html")) return "text/html";
|
||||||
else if(filename.endsWith(".css")) return "text/css";
|
else if(filename.endsWith(".css")) return "text/css";
|
||||||
|
@ -397,11 +397,18 @@ HTTP traffic is unencrypted. An attacker in the same network can intercept form
|
|||||||
<hr><a class="btn" href="/presets.json?download" target="download-frame">
|
<hr><a class="btn" href="/presets.json?download" target="download-frame">
|
||||||
Backup presets</a><br><div id="presets">Restore presets:<input type="file"
|
Backup presets</a><br><div id="presets">Restore presets:<input type="file"
|
||||||
name="data" accept=".json"> <input type="button" value="Upload"
|
name="data" accept=".json"> <input type="button" value="Upload"
|
||||||
onclick='uploadFile(d.Sf.data,"/presets.json")'><br></div><hr><h3>
|
onclick='uploadFile(d.Sf.data,"/presets.json")'><br></div><a class="btn"
|
||||||
Software Update</h3><button type="button" onclick="U()">Manual OTA Update
|
href="/cfg.json?download" target="download-frame">Backup configuration</a><br>
|
||||||
</button><br>Enable ArduinoOTA: <input type="checkbox" name="AO"><br><h3>About
|
<div id="presets">Restore configuration:<input type="file" name="data2"
|
||||||
</h3><a href="https://github.com/Aircoookie/WLED/" target="_blank">WLED</a>
|
accept=".json"> <input type="button" value="Upload"
|
||||||
version 0.13.0-bl2<br><br><a
|
onclick='uploadFile(d.Sf.data2,"/cfg.json")'><br></div><div style="color:#f21">
|
||||||
|
WARNING!<br>
|
||||||
|
Restoring presets/configuration will OVERWRITE current presets/configuration.
|
||||||
|
<br>Incorrect configuration may require factory reset or re-flashing of ESP.
|
||||||
|
</div><hr><h3>Software Update</h3><button type="button" onclick="U()">
|
||||||
|
Manual OTA Update</button><br>Enable ArduinoOTA: <input type="checkbox"
|
||||||
|
name="AO"><br><hr><h3>About</h3><a href="https://github.com/Aircoookie/WLED/"
|
||||||
|
target="_blank">WLED</a> version 0.13.0-bl2<br><br><a
|
||||||
href="https://github.com/Aircoookie/WLED/wiki/Contributors-and-credits"
|
href="https://github.com/Aircoookie/WLED/wiki/Contributors-and-credits"
|
||||||
target="_blank">Contributors, dependencies and special thanks</a><br>
|
target="_blank">Contributors, dependencies and special thanks</a><br>
|
||||||
A huge thank you to everyone who helped me create WLED!<br><br>
|
A huge thank you to everyone who helped me create WLED!<br><br>
|
||||||
|
1615
wled00/html_ui.h
1615
wled00/html_ui.h
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// version code in format yymmddb (b = daily build)
|
// version code in format yymmddb (b = daily build)
|
||||||
#define VERSION 2107151
|
#define VERSION 2107152
|
||||||
|
|
||||||
//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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user