Merge branch 'dev' of https://github.com/aircoookie/WLED into dev
Conflicts: wled00/cfg.cpp wled00/data/index.js wled00/fcn_declare.h wled00/html_ui.h wled00/json.cpp wled00/playlist.cpp wled00/wled.h
This commit is contained in:
@@ -55,7 +55,7 @@ var cpick = new iro.ColorPicker("#picker", {
|
||||
});
|
||||
|
||||
function handleVisibilityChange() {
|
||||
if (!document.hidden && new Date () - lastUpdate > 3000) {
|
||||
if (!d.hidden && new Date () - lastUpdate > 3000) {
|
||||
requestJson(null);
|
||||
}
|
||||
}
|
||||
@@ -318,13 +318,13 @@ function qlName(i) {
|
||||
}
|
||||
|
||||
function cpBck() {
|
||||
var copyText = document.getElementById("bck");
|
||||
var copyText = d.getElementById("bck");
|
||||
|
||||
copyText.select();
|
||||
copyText.setSelectionRange(0, 999999);
|
||||
|
||||
document.execCommand("copy");
|
||||
copyText.select();
|
||||
copyText.setSelectionRange(0, 999999);
|
||||
|
||||
d.execCommand("copy");
|
||||
|
||||
showToast("Copied to clipboard!");
|
||||
}
|
||||
|
||||
@@ -686,8 +686,12 @@ function populateNodes(i,n)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (nnodes == 0) cn += `No other instances found.`;
|
||||
cn += `<table class="infot">${urows}${inforow("Current instance:",i.name)}</table>`;
|
||||
if (i.ndc < 0) cn += `Instance List is disabled.`;
|
||||
else if (nnodes == 0) cn += `No other instances found.`;
|
||||
cn += `<table class="infot">
|
||||
${urows}
|
||||
${inforow("Current instance:",i.name)}
|
||||
</table>`;
|
||||
d.getElementById('kn').innerHTML = cn;
|
||||
}
|
||||
|
||||
@@ -1082,10 +1086,9 @@ function requestJson(command, rinfo = true, verbose = true, callback = null) {
|
||||
syncTglRecv = info.str;
|
||||
maxSeg = info.leds.maxseg;
|
||||
pmt = info.fs.pmt;
|
||||
if (!command && pmt != pmtLast) {
|
||||
setTimeout(loadPresets,99);
|
||||
}
|
||||
if (!command && pmt != pmtLast) setTimeout(loadPresets,99);
|
||||
pmtLast = pmt;
|
||||
d.getElementById('buttonNodes').style.display = (info.ndc > 0 && window.innerWidth > 770) ? "block":"none";
|
||||
lastinfo = info;
|
||||
if (isInfo) populateInfo(info);
|
||||
s = json.state;
|
||||
@@ -1648,13 +1651,7 @@ function rSegs()
|
||||
|
||||
function loadPalettesData()
|
||||
{
|
||||
if (palettesData) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (getPalettesDataCached()) {
|
||||
return;
|
||||
}
|
||||
if (palettesData || getPalettesDataCached()) return;
|
||||
|
||||
var dateExpiration = new Date();
|
||||
palettesData = {};
|
||||
@@ -1687,9 +1684,7 @@ function getPalettesDataCached() {
|
||||
function getPalettesData(page, callback)
|
||||
{
|
||||
var url = `/json/palx?page=${page}`;
|
||||
if (loc) {
|
||||
url = `http://${locip}${url}`;
|
||||
}
|
||||
if (loc) url = `http://${locip}${url}`;
|
||||
|
||||
fetch(url, {
|
||||
method: 'get',
|
||||
@@ -1769,7 +1764,7 @@ function unfocusSliders() {
|
||||
}
|
||||
|
||||
//sliding UI
|
||||
const _C = document.querySelector('.container'), N = 4;
|
||||
const _C = d.querySelector('.container'), N = 4;
|
||||
|
||||
let iSlide = 0, x0 = null, scrollS = 0, locked = false, w;
|
||||
|
||||
@@ -1820,6 +1815,7 @@ function move(e) {
|
||||
|
||||
function size() {
|
||||
w = window.innerWidth;
|
||||
d.getElementById('buttonNodes').style.display = (lastinfo.ndc > 0 && w > 770) ? "block":"none";
|
||||
var h = d.getElementById('top').clientHeight;
|
||||
sCol('--th', h + "px");
|
||||
sCol('--bh', d.getElementById('bot').clientHeight + "px");
|
||||
|
||||
Reference in New Issue
Block a user