Notification & UI fix
This commit is contained in:
parent
43d50e270a
commit
f20065f546
@ -43,7 +43,7 @@
|
||||
//h.appendChild(l); // if this fires too quickly for ESP8266 use next line
|
||||
setTimeout(function(){h.appendChild(l)},50);
|
||||
});
|
||||
h.appendChild(l);
|
||||
setTimeout(function(){h.appendChild(l)},50);
|
||||
</script>
|
||||
<link rel="stylesheet" href="index.css">
|
||||
</head>
|
||||
|
@ -209,7 +209,7 @@ function onLoad()
|
||||
.catch(function (error) {
|
||||
console.log("holidays.json does not contain array of holidays. Defaults loaded.");
|
||||
})
|
||||
.finally(function(){
|
||||
.finally(()=>{
|
||||
loadBg(cfg.theme.bg.url);
|
||||
});
|
||||
} else
|
||||
@ -271,7 +271,7 @@ function showToast(text, error = false)
|
||||
x.classList.add(error ? "error":"show");
|
||||
clearTimeout(timeout);
|
||||
x.style.animation = 'none';
|
||||
timeout = setTimeout(function(){ x.classList.remove("show"); }, 2900);
|
||||
timeout = setTimeout(()=>{ x.classList.remove("show"); }, 2900);
|
||||
if (error) console.log(text);
|
||||
}
|
||||
|
||||
@ -711,7 +711,7 @@ function populateSegments(s)
|
||||
for (var i = 0; i <= lSeg; i++) {
|
||||
updateLen(i);
|
||||
updateTrail(gId(`seg${i}bri`));
|
||||
gId(`segr${lSeg}`).style.display = "none";
|
||||
gId(`segr${i}`).style.display = "none";
|
||||
}
|
||||
if (segCount < 2) gId(`segd${lSeg}`).style.display = "none";
|
||||
if (!noNewSegs && (cfg.comp.seglen?parseInt(gId(`seg${lSeg}s`).value):0)+parseInt(gId(`seg${lSeg}e`).value)<ledCount) gId(`segr${lSeg}`).style.display = "inline";
|
||||
@ -2052,7 +2052,7 @@ function setBalance(b)
|
||||
}
|
||||
|
||||
var hc = 0;
|
||||
setInterval(function(){if (!isInfo) return; hc+=18; if (hc>300) hc=0; if (hc>200)hc=306; if (hc==144) hc+=36; if (hc==108) hc+=18;
|
||||
setInterval(()=>{if (!isInfo) return; hc+=18; if (hc>300) hc=0; if (hc>200)hc=306; if (hc==144) hc+=36; if (hc==108) hc+=18;
|
||||
gId('heart').style.color = `hsl(${hc}, 100%, 50%)`;}, 910);
|
||||
|
||||
function openGH() { window.open("https://github.com/Aircoookie/WLED/wiki"); }
|
||||
@ -2093,9 +2093,9 @@ function loadPalettesData(callback = null)
|
||||
var lsPalData = localStorage.getItem(lsKey);
|
||||
if (lsPalData) {
|
||||
try {
|
||||
lsPalData = JSON.parse(lsPalData);
|
||||
if (lsPalData && lsPalData.vid == lastinfo.vid) {
|
||||
palettesData = lsPalData.p;
|
||||
var d = JSON.parse(lsPalData);
|
||||
if (d && d.vid == d.vid) {
|
||||
palettesData = d.p;
|
||||
if (callback) callback(); // redrawPalPrev()
|
||||
return;
|
||||
}
|
||||
@ -2103,7 +2103,7 @@ function loadPalettesData(callback = null)
|
||||
}
|
||||
|
||||
palettesData = {};
|
||||
getPalettesData(0, function() {
|
||||
getPalettesData(0, ()=>{
|
||||
localStorage.setItem(lsKey, JSON.stringify({
|
||||
p: palettesData,
|
||||
vid: lastinfo.vid
|
||||
@ -2128,10 +2128,10 @@ function getPalettesData(page, callback)
|
||||
})
|
||||
.then(json => {
|
||||
palettesData = Object.assign({}, palettesData, json.p);
|
||||
if (page < json.m) setTimeout(function() { getPalettesData(page + 1, callback); }, 50);
|
||||
if (page < json.m) setTimeout(()=>{ getPalettesData(page + 1, callback); }, 50);
|
||||
else callback();
|
||||
})
|
||||
.catch(function(error) {
|
||||
.catch((error)=>{
|
||||
showToast(error, true);
|
||||
console.log(error);
|
||||
});
|
||||
|
@ -8,7 +8,7 @@
|
||||
// Autogenerated from wled00/data/style.css, do not edit!!
|
||||
const uint16_t PAGE_settingsCss_length = 719;
|
||||
const uint8_t PAGE_settingsCss[] PROGMEM = {
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0xad, 0x54, 0xdb, 0x6e, 0x9c, 0x30,
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xad, 0x54, 0xdb, 0x6e, 0x9c, 0x30,
|
||||
0x10, 0xfd, 0x15, 0xaa, 0x28, 0x52, 0x22, 0x2d, 0x08, 0x58, 0x20, 0x5b, 0xa3, 0x4a, 0x55, 0x3f,
|
||||
0xa2, 0xaa, 0x54, 0xe5, 0xc1, 0xe0, 0x61, 0xb1, 0xd6, 0x17, 0x64, 0x9b, 0x84, 0x2d, 0xe2, 0xdf,
|
||||
0x6b, 0x73, 0xe9, 0x92, 0x0d, 0xdd, 0xbc, 0xe4, 0x61, 0x57, 0x98, 0x19, 0xc6, 0x67, 0xce, 0x99,
|
||||
@ -75,7 +75,7 @@ type="submit">Security & Updates</button></form></body></html>)=====";
|
||||
// Autogenerated from wled00/data/settings_wifi.htm, do not edit!!
|
||||
const uint16_t PAGE_settings_wifi_length = 1240;
|
||||
const uint8_t PAGE_settings_wifi[] PROGMEM = {
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0xad, 0x57, 0x6d, 0x6f, 0xe2, 0x46,
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xad, 0x57, 0x6d, 0x6f, 0xe2, 0x46,
|
||||
0x10, 0xfe, 0xee, 0x5f, 0xb1, 0xdd, 0x4a, 0x15, 0x48, 0x60, 0xde, 0x9a, 0x28, 0xa2, 0x36, 0x57,
|
||||
0x02, 0x34, 0x44, 0xba, 0xe6, 0xa8, 0x40, 0x8d, 0xfa, 0xe9, 0xb4, 0xd8, 0x03, 0xde, 0xc6, 0xde,
|
||||
0xf5, 0x79, 0xd7, 0x18, 0x74, 0xbd, 0xff, 0xde, 0x59, 0xdb, 0xbc, 0x87, 0xf4, 0x1a, 0xa1, 0x28,
|
||||
@ -159,7 +159,7 @@ const uint8_t PAGE_settings_wifi[] PROGMEM = {
|
||||
// Autogenerated from wled00/data/settings_leds.htm, do not edit!!
|
||||
const uint16_t PAGE_settings_leds_length = 6520;
|
||||
const uint8_t PAGE_settings_leds[] PROGMEM = {
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0xa5, 0x3c, 0x6b, 0x57, 0xdb, 0xc8,
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xa5, 0x3c, 0x6b, 0x57, 0xdb, 0xc8,
|
||||
0x92, 0xdf, 0xfd, 0x2b, 0x9a, 0x9e, 0x19, 0x22, 0x5d, 0x84, 0x91, 0xfc, 0x60, 0x88, 0x6d, 0x99,
|
||||
0xc5, 0x84, 0x64, 0xd8, 0x0b, 0x13, 0x0e, 0x26, 0x33, 0xbb, 0x67, 0x26, 0x67, 0x68, 0xcb, 0x6d,
|
||||
0x5b, 0x41, 0x96, 0x7c, 0x25, 0x19, 0xe2, 0x05, 0xef, 0x6f, 0xda, 0xdf, 0xb0, 0xbf, 0x6c, 0xab,
|
||||
@ -573,7 +573,7 @@ const uint8_t PAGE_settings_leds[] PROGMEM = {
|
||||
// Autogenerated from wled00/data/settings_dmx.htm, do not edit!!
|
||||
const uint16_t PAGE_settings_dmx_length = 1324;
|
||||
const uint8_t PAGE_settings_dmx[] PROGMEM = {
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0x95, 0x56, 0x5b, 0x6f, 0xdb, 0x36,
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0x95, 0x56, 0x5b, 0x6f, 0xdb, 0x36,
|
||||
0x14, 0x7e, 0xd7, 0xaf, 0x60, 0xf9, 0x62, 0x09, 0x71, 0x25, 0x2b, 0x99, 0xbb, 0xd5, 0x91, 0x94,
|
||||
0xd5, 0x4e, 0xe0, 0x04, 0x68, 0xb2, 0xa2, 0x6e, 0xd7, 0x0d, 0xcb, 0x30, 0xd0, 0x12, 0x6d, 0xb1,
|
||||
0x91, 0x48, 0x8d, 0xa4, 0xec, 0xb8, 0xc3, 0xfe, 0xfb, 0x0e, 0x45, 0x49, 0x76, 0xd3, 0xa6, 0x5d,
|
||||
@ -662,7 +662,7 @@ const uint8_t PAGE_settings_dmx[] PROGMEM = {
|
||||
// Autogenerated from wled00/data/settings_ui.htm, do not edit!!
|
||||
const uint16_t PAGE_settings_ui_length = 2784;
|
||||
const uint8_t PAGE_settings_ui[] PROGMEM = {
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0xad, 0x59, 0x6b, 0x73, 0xdb, 0xb8,
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xad, 0x59, 0x6b, 0x73, 0xdb, 0xb8,
|
||||
0x15, 0xfd, 0xae, 0x5f, 0x81, 0x20, 0x19, 0xaf, 0x38, 0x66, 0x68, 0xd9, 0xd9, 0x4e, 0x13, 0x49,
|
||||
0x94, 0x1b, 0x3f, 0x92, 0xb8, 0xe3, 0x34, 0x69, 0x64, 0x37, 0xbb, 0x93, 0xf1, 0x78, 0x21, 0x12,
|
||||
0x92, 0x10, 0x83, 0x00, 0x97, 0x00, 0x6d, 0xab, 0x8a, 0xfe, 0x7b, 0xef, 0x05, 0x48, 0x89, 0x92,
|
||||
@ -842,7 +842,7 @@ const uint8_t PAGE_settings_ui[] PROGMEM = {
|
||||
// Autogenerated from wled00/data/settings_sync.htm, do not edit!!
|
||||
const uint16_t PAGE_settings_sync_length = 2616;
|
||||
const uint8_t PAGE_settings_sync[] PROGMEM = {
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0x95, 0x19, 0x5b, 0x77, 0xda, 0x38,
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0x95, 0x19, 0x5b, 0x77, 0xda, 0x38,
|
||||
0xf3, 0xdd, 0xbf, 0x42, 0xf5, 0x43, 0x37, 0x6c, 0x08, 0xb7, 0x84, 0x34, 0x4d, 0xb0, 0xfb, 0x41,
|
||||
0x48, 0x93, 0x9c, 0x6d, 0x1a, 0x0a, 0xe9, 0x76, 0xf7, 0xa9, 0x47, 0xd8, 0x02, 0x14, 0x6c, 0xcb,
|
||||
0x6b, 0xc9, 0xb9, 0x9c, 0x9e, 0xfe, 0xf7, 0x6f, 0x46, 0xb2, 0x0d, 0x38, 0x10, 0xc8, 0x43, 0x82,
|
||||
@ -1012,7 +1012,7 @@ const uint8_t PAGE_settings_sync[] PROGMEM = {
|
||||
// Autogenerated from wled00/data/settings_time.htm, do not edit!!
|
||||
const uint16_t PAGE_settings_time_length = 2388;
|
||||
const uint8_t PAGE_settings_time[] PROGMEM = {
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0xb5, 0x59, 0x6d, 0x73, 0xdb, 0x36,
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xb5, 0x59, 0x6d, 0x73, 0xdb, 0x36,
|
||||
0x12, 0xfe, 0xce, 0x5f, 0x81, 0xb2, 0x99, 0x58, 0xaa, 0xf5, 0xee, 0x28, 0x95, 0x2d, 0x91, 0x39,
|
||||
0x59, 0x56, 0xe2, 0x24, 0x96, 0xec, 0x39, 0x29, 0x4d, 0x93, 0x4e, 0xa7, 0x85, 0x48, 0x48, 0x84,
|
||||
0x4d, 0x02, 0x3a, 0x02, 0xb4, 0x9c, 0xf3, 0xf8, 0xbf, 0xdf, 0x82, 0x20, 0xa9, 0x57, 0x4a, 0x4e,
|
||||
@ -1168,7 +1168,7 @@ const uint8_t PAGE_settings_time[] PROGMEM = {
|
||||
// Autogenerated from wled00/data/settings_sec.htm, do not edit!!
|
||||
const uint16_t PAGE_settings_sec_length = 1802;
|
||||
const uint8_t PAGE_settings_sec[] PROGMEM = {
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0x95, 0x57, 0x6d, 0x6f, 0xdb, 0x38,
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0x95, 0x57, 0x6d, 0x6f, 0xdb, 0x38,
|
||||
0x12, 0xfe, 0xae, 0x5f, 0x41, 0xb3, 0x40, 0xd7, 0x06, 0x64, 0x29, 0x49, 0x6f, 0x17, 0xdd, 0xc4,
|
||||
0x52, 0xcf, 0x69, 0x9c, 0x4d, 0x80, 0x64, 0x13, 0xc4, 0xee, 0xf6, 0x0e, 0x87, 0x43, 0x41, 0x4b,
|
||||
0x23, 0x8b, 0x6b, 0x99, 0xd4, 0x92, 0x54, 0x5c, 0xa3, 0xe8, 0x7f, 0xbf, 0x19, 0x4a, 0x4a, 0x9c,
|
||||
@ -1287,7 +1287,7 @@ const uint8_t PAGE_settings_sec[] PROGMEM = {
|
||||
// Autogenerated from wled00/data/settings_um.htm, do not edit!!
|
||||
const uint16_t PAGE_settings_um_length = 1767;
|
||||
const uint8_t PAGE_settings_um[] PROGMEM = {
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0xa5, 0x57, 0x6d, 0x6f, 0xdb, 0x38,
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xa5, 0x57, 0x6d, 0x6f, 0xdb, 0x38,
|
||||
0x12, 0xfe, 0xee, 0x5f, 0xc1, 0xb0, 0x41, 0x22, 0xc1, 0x8a, 0x6c, 0x37, 0xdb, 0xdb, 0xd4, 0x36,
|
||||
0xe5, 0xdd, 0xf4, 0xe5, 0x1a, 0xa0, 0xbd, 0x04, 0x48, 0x77, 0x0f, 0x87, 0x20, 0xd8, 0xc8, 0xd2,
|
||||
0xc8, 0xe6, 0x46, 0x22, 0x05, 0x92, 0xb2, 0x93, 0x73, 0xfc, 0xdf, 0x77, 0x48, 0xc9, 0xb2, 0xdd,
|
||||
|
3070
wled00/html_ui.h
3070
wled00/html_ui.h
File diff suppressed because it is too large
Load Diff
@ -158,6 +158,8 @@ void deserializeSegment(JsonObject elem, byte it, byte presetId)
|
||||
seg.setOption(SEG_OPTION_REVERSED, elem["rev"] | seg.getOption(SEG_OPTION_REVERSED));
|
||||
seg.setOption(SEG_OPTION_MIRROR , elem[F("mi")] | seg.getOption(SEG_OPTION_MIRROR ));
|
||||
|
||||
if (!(elem[F("sel")].isNull() && elem["rev"].isNull() && elem["on"].isNull() && elem[F("mi")].isNull())) effectChanged = true; //send UDP
|
||||
|
||||
//temporary, strip object gets updated via colorUpdated()
|
||||
if (id == strip.getMainSegmentId()) {
|
||||
byte effectPrev = effectCurrent;
|
||||
|
@ -84,7 +84,7 @@ void colorUpdated(int callMode)
|
||||
bool someSel = false;
|
||||
|
||||
if (callMode == CALL_MODE_NOTIFICATION) {
|
||||
someSel = (receiveNotificationBrightness || receiveNotificationColor || receiveNotificationEffects);
|
||||
someSel = (receiveNotificationBrightness || receiveNotificationColor || receiveNotificationEffects || receiveSegmentOptions);
|
||||
}
|
||||
|
||||
//Notifier: apply received FX to selected segments only if actually receiving FX
|
||||
|
@ -420,6 +420,7 @@ void getSettingsJS(byte subPage, char* dest)
|
||||
sappend('c',SET_F("RB"),receiveNotificationBrightness);
|
||||
sappend('c',SET_F("RC"),receiveNotificationColor);
|
||||
sappend('c',SET_F("RX"),receiveNotificationEffects);
|
||||
sappend('c',SET_F("SO"),receiveSegmentOptions);
|
||||
sappend('c',SET_F("SD"),notifyDirectDefault);
|
||||
sappend('c',SET_F("SB"),notifyButton);
|
||||
sappend('c',SET_F("SH"),notifyHue);
|
||||
|
Loading…
Reference in New Issue
Block a user