UI fixes & small changes.

This commit is contained in:
Blaz Kristan 2021-05-16 19:06:00 +02:00
parent 7652336c84
commit 4a5a9b73b1
3 changed files with 1819 additions and 1794 deletions

View File

@ -223,11 +223,13 @@ button {
.top button { .top button {
padding: var(--tbp); padding: var(--tbp);
margin: 0;
} }
.bot button { .bot button {
padding: var(--bbp); padding: var(--bbp);
width:25%; width:25%;
margin: 0;
} }
.tab button:hover { .tab button:hover {
@ -558,7 +560,7 @@ input[type=range]::-moz-range-thumb {
background-color: var(--c-3); background-color: var(--c-3);
color: var(--c-d); color: var(--c-d);
cursor: pointer; cursor: pointer;
border: 0px solid var(--c-f); border: 1px solid var(--c-3);
border-radius: 25px; border-radius: 25px;
transition-duration: 0.5s; transition-duration: 0.5s;
-webkit-backface-visibility: hidden; -webkit-backface-visibility: hidden;
@ -959,7 +961,7 @@ input[type=number]::-webkit-outer-spin-button {
} }
.lstI.sticky { .lstI.sticky {
top: 99px; top: 98px;
} }
.lstIcontent { .lstIcontent {
@ -1087,11 +1089,21 @@ input[type="text"].fnd:not(:placeholder-shown) {
} }
} }
@media all and (max-width: 685px) { @media all and (max-width: 540px) {
.top button { .top button {
width: 16.6%; width: 16.6%;
padding: 8px 0 4px 0; padding: 8px 0 4px 0;
} }
}
@media all and (min-width: 541px) and (max-width: 719px) {
.top button {
width: 14.2%;
padding: 8px 0 4px 0;
}
}
@media all and (max-width: 719px) {
.hd { .hd {
display: none !important; display: none !important;
} }
@ -1101,8 +1113,14 @@ input[type="text"].fnd:not(:placeholder-shown) {
} }
} }
@media all and (max-width: 798px) {
#buttonNodes {
display: none;
}
}
@media all and (max-width: 1249px) { @media all and (max-width: 1249px) {
#buttonPcm, #buttonNodes { #buttonPcm {
display: none; display: none;
} }
} }

View File

@ -534,7 +534,7 @@ function loadInfo(callback=null)
syncTglRecv = json.str; syncTglRecv = json.str;
maxSeg = json.leds.maxseg; maxSeg = json.leds.maxseg;
pmt = json.fs.pmt; pmt = json.fs.pmt;
gId('buttonNodes').style.display = (json.ndc > 0 && window.innerWidth > 770) ? "block":"none"; gId('buttonNodes').style.display = showNodes() ? "block":"none";
populateInfo(json); populateInfo(json);
if (callback) callback(); if (callback) callback();
}) })
@ -958,7 +958,7 @@ function updateUI(scrollto=false)
gId('buttonPower').className = (isOn) ? "active":""; gId('buttonPower').className = (isOn) ? "active":"";
gId('buttonNl').className = (nlA) ? "active":""; gId('buttonNl').className = (nlA) ? "active":"";
gId('buttonSync').className = (syncSend) ? "active":""; gId('buttonSync').className = (syncSend) ? "active":"";
gId('buttonNodes').style.display = (lastinfo.ndc > 0 && window.innerWidth > 770) ? "block":"none"; gId('buttonNodes').style.display = showNodes() ? "block":"none";
updateSelectedPalette(scrollto); updateSelectedPalette(scrollto);
updateSelectedFx(scrollto); updateSelectedFx(scrollto);
@ -1819,10 +1819,14 @@ function move(e)
x0 = null; x0 = null;
} }
function showNodes() {
return (lastinfo.ndc > 0 && (w > 797 || (w > 539 && w < 720)));
}
function size() function size()
{ {
w = window.innerWidth; w = window.innerWidth;
gId('buttonNodes').style.display = (lastinfo.ndc > 0 && w > 770) ? "block":"none"; gId('buttonNodes').style.display = showNodes() ? "block":"none";
var h = gId('top').clientHeight; var h = gId('top').clientHeight;
sCol('--th', h + "px"); sCol('--th', h + "px");
sCol('--bh', gId('bot').clientHeight + "px"); sCol('--bh', gId('bot').clientHeight + "px");

File diff suppressed because it is too large Load Diff