mirror of
https://github.com/wled/WLED.git
synced 2025-07-25 11:46:34 +00:00
UI fixes.
- correct load sequence - incorrect power on repeated segments - update button - fix for find icon - connection icon colors
This commit is contained in:
parent
92cbdde429
commit
1663601dcb
@ -16,9 +16,10 @@
|
|||||||
--c-c: #ccc;
|
--c-c: #ccc;
|
||||||
--c-e: #eee;
|
--c-e: #eee;
|
||||||
--c-d: #ddd;
|
--c-d: #ddd;
|
||||||
--c-r: #e42;
|
--c-r: #c32;
|
||||||
--c-g: #4e2;
|
--c-g: #2c1;
|
||||||
--c-l: #48a;
|
--c-l: #48a;
|
||||||
|
--c-y: #a90;
|
||||||
--t-b: 0.5;
|
--t-b: 0.5;
|
||||||
--c-o: rgba(34, 34, 34, 0.9);
|
--c-o: rgba(34, 34, 34, 0.9);
|
||||||
--c-tb : rgba(34, 34, 34, var(--t-b));
|
--c-tb : rgba(34, 34, 34, var(--t-b));
|
||||||
@ -1173,6 +1174,7 @@ textarea {
|
|||||||
.fnd {
|
.fnd {
|
||||||
width: 280px;
|
width: 280px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="text"].fnd {
|
input[type="text"].fnd {
|
||||||
|
@ -299,6 +299,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<button class="btn infobtn" onclick="requestJson()">Refresh</button>
|
<button class="btn infobtn" onclick="requestJson()">Refresh</button>
|
||||||
<button class="btn infobtn" onclick="toggleNodes()">Instance List</button>
|
<button class="btn infobtn" onclick="toggleNodes()">Instance List</button>
|
||||||
|
<button class="btn infobtn" onclick="window.open('/update','_self');">Update WLED</button>
|
||||||
<button class="btn infobtn" id="resetbtn" onclick="cnfReset()">Reboot WLED</button>
|
<button class="btn infobtn" id="resetbtn" onclick="cnfReset()">Reboot WLED</button>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
@ -240,14 +240,13 @@ function onLoad()
|
|||||||
|
|
||||||
// Load initial data
|
// Load initial data
|
||||||
loadPalettes(()=>{
|
loadPalettes(()=>{
|
||||||
loadPalettesData(redrawPalPrev);
|
|
||||||
// fill effect extra data array
|
// fill effect extra data array
|
||||||
loadFXData(()=>{
|
loadFXData(()=>{
|
||||||
// load and populate effects
|
// load and populate effects
|
||||||
loadFX(()=>{
|
loadFX(()=>{
|
||||||
setTimeout(()=>{ // ESP8266 can't handle quick requests
|
setTimeout(()=>{ // ESP8266 can't handle quick requests
|
||||||
loadPresets(()=>{
|
loadPalettesData(()=>{
|
||||||
requestJson(); // will create WS
|
requestJson();// will load presets and create WS
|
||||||
});
|
});
|
||||||
},100);
|
},100);
|
||||||
});
|
});
|
||||||
@ -1104,7 +1103,7 @@ function makeWS() {
|
|||||||
ws = new WebSocket((window.location.protocol == "https:"?"wss":"ws")+'://'+(loc?locip:window.location.hostname)+'/ws');
|
ws = new WebSocket((window.location.protocol == "https:"?"wss":"ws")+'://'+(loc?locip:window.location.hostname)+'/ws');
|
||||||
ws.binaryType = "arraybuffer";
|
ws.binaryType = "arraybuffer";
|
||||||
ws.onmessage = (e)=>{
|
ws.onmessage = (e)=>{
|
||||||
if (e.data instanceof ArrayBuffer) return; // liveview packet
|
if (e.data instanceof ArrayBuffer) return; // liveview packet
|
||||||
var json = JSON.parse(e.data);
|
var json = JSON.parse(e.data);
|
||||||
if (json.leds) return; // JSON liveview packet
|
if (json.leds) return; // JSON liveview packet
|
||||||
clearTimeout(jsonTimeout);
|
clearTimeout(jsonTimeout);
|
||||||
@ -1367,7 +1366,7 @@ var reqsLegal = false;
|
|||||||
|
|
||||||
function requestJson(command=null)
|
function requestJson(command=null)
|
||||||
{
|
{
|
||||||
gId('connind').style.backgroundColor = "var(--c-r)";
|
gId('connind').style.backgroundColor = "var(--c-y)";
|
||||||
if (command && !reqsLegal) return; // stop post requests from chrome onchange event on page restore
|
if (command && !reqsLegal) return; // stop post requests from chrome onchange event on page restore
|
||||||
if (!jsonTimeout) jsonTimeout = setTimeout(()=>{if (ws) ws.close(); ws=null; showErrorToast()}, 3000);
|
if (!jsonTimeout) jsonTimeout = setTimeout(()=>{if (ws) ws.close(); ws=null; showErrorToast()}, 3000);
|
||||||
var req = null;
|
var req = null;
|
||||||
@ -1418,8 +1417,12 @@ function requestJson(command=null)
|
|||||||
}
|
}
|
||||||
var s = json.state ? json.state : json;
|
var s = json.state ? json.state : json;
|
||||||
readState(s);
|
readState(s);
|
||||||
if (!(ws && ws.readyState === WebSocket.OPEN)) makeWS();
|
//load presets, and open websocket sequentially
|
||||||
if (!pJson) loadPresets();
|
setTimeout(()=>{
|
||||||
|
loadPresets(()=>{
|
||||||
|
if (!(ws && ws.readyState === WebSocket.OPEN)) makeWS();
|
||||||
|
});
|
||||||
|
},25);
|
||||||
reqsLegal = true;
|
reqsLegal = true;
|
||||||
})
|
})
|
||||||
.catch((e)=>{
|
.catch((e)=>{
|
||||||
@ -1814,7 +1817,7 @@ function rptSeg(s)
|
|||||||
var mi = gId(`seg${s}mi`).checked;
|
var mi = gId(`seg${s}mi`).checked;
|
||||||
var sel = gId(`seg${s}sel`).checked;
|
var sel = gId(`seg${s}sel`).checked;
|
||||||
var pwr = gId(`seg${s}pwr`).classList.contains("act");
|
var pwr = gId(`seg${s}pwr`).classList.contains("act");
|
||||||
var obj = {"seg": {"id": s, "n": name, "start": start, "stop": (cfg.comp.seglen?start:0)+stop, "rev": rev, "mi": mi, "on": !pwr, "bri": parseInt(gId(`seg${s}bri`).value), "sel": sel}};
|
var obj = {"seg": {"id": s, "n": name, "start": start, "stop": (cfg.comp.seglen?start:0)+stop, "rev": rev, "mi": mi, "on": pwr, "bri": parseInt(gId(`seg${s}bri`).value), "sel": sel}};
|
||||||
if (gId(`seg${s}grp`)) {
|
if (gId(`seg${s}grp`)) {
|
||||||
var grp = parseInt(gId(`seg${s}grp`).value);
|
var grp = parseInt(gId(`seg${s}grp`).value);
|
||||||
var spc = parseInt(gId(`seg${s}spc`).value);
|
var spc = parseInt(gId(`seg${s}spc`).value);
|
||||||
@ -2259,7 +2262,7 @@ function loadPalettesData(callback = null)
|
|||||||
var d = JSON.parse(lsPalData);
|
var d = JSON.parse(lsPalData);
|
||||||
if (d && d.vid == d.vid) {
|
if (d && d.vid == d.vid) {
|
||||||
palettesData = d.p;
|
palettesData = d.p;
|
||||||
if (callback) callback(); // actually redrawPalPrev()
|
if (callback) callback();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
@ -2271,7 +2274,8 @@ function loadPalettesData(callback = null)
|
|||||||
p: palettesData,
|
p: palettesData,
|
||||||
vid: lastinfo.vid
|
vid: lastinfo.vid
|
||||||
}));
|
}));
|
||||||
if (callback) setTimeout(callback, 99); // actually redrawPalPrev()
|
redrawPalPrev()
|
||||||
|
if (callback) setTimeout(callback, 99);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
3395
wled00/html_ui.h
3395
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 2204161
|
#define VERSION 2204171
|
||||||
|
|
||||||
//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