UI tweaks

This commit is contained in:
Ewoud
2023-03-28 10:51:38 +02:00
parent 5991aa8624
commit ddd4c0d676
2 changed files with 1412 additions and 1413 deletions

View File

@@ -1,6 +1,6 @@
//page js
var loc = false, locip;
var isOn = false, nlA = false, isLv = true, isInfo = false, isNodes = false, syncSend = false, syncTglRecv = true;
var isOn = false, nlA = false, isLv = false, isInfo = false, isNodes = false, syncSend = false, syncTglRecv = true;
var hasWhite = false, hasRGB = false, hasCCT = false;
var nlDur = 60, nlTar = 0;
var nlMode = false;
@@ -269,8 +269,6 @@ function onLoad()
sl.addEventListener('touchstart', toggleBubble);
sl.addEventListener('touchend', toggleBubble);
}
gId('buttonSr').className = "active"; //WLEDMM: on after load
}
function updateTablinks(tabI)
@@ -613,7 +611,9 @@ function parseInfo(i) {
mw = i.leds.matrix ? i.leds.matrix.w : 0;
mh = i.leds.matrix ? i.leds.matrix.h : 0;
isM = mw>0 && mh>0;
if (!isM) {
if (isM) {
gId('buttonSr').className = "active"; isLv = true; //WLEDMM: on after load
} else {
gId("filter1D").classList.add('hide');
//gId("filter2D").classList.add('hide');
hideModes("2D");
@@ -3235,7 +3235,7 @@ function size()
var h = gId('top').clientHeight;
sCol('--th', h + "px");
sCol('--bh', gId('bot').clientHeight + "px");
if (isLv) h -= 4;
if (isLv && !isM) h -= 4; //WLEDMM: no for matrices
sCol('--tp', h + "px");
togglePcMode();
}
@@ -3247,7 +3247,7 @@ function togglePcMode(fromB = false)
localStorage.setItem('pcm', pcModeA);
pcMode = pcModeA;
}
if (wW < 1024 && !pcMode) return;
if (wW <= 1024 && !pcMode) return;
if (!fromB && ((wW <= 1024 && lastw <= 1024) || (wW > 1024 && lastw > 1024))) return;
openTab(0, true);
if (wW <= 1024) {pcMode = false;}

File diff suppressed because it is too large Load Diff