Minor tewaks.

This commit is contained in:
Blaz Kristan 2023-11-22 16:39:33 +01:00 committed by Woody
parent 5e1d6014d5
commit 520826abc0
No known key found for this signature in database
GPG Key ID: 9872D7F5072789B2
2 changed files with 18 additions and 10 deletions

View File

@ -1289,6 +1289,11 @@ TD .checkmark, TD .radiomark {
margin-top: 0;
}
#segcont.simple .lstI {
margin-top: 4px;
min-height: unset;
}
/* selected item/element */
.selected { /* has to be after .lstI since !important is not ok */
background: var(--c-4);
@ -1334,7 +1339,7 @@ TD .checkmark, TD .radiomark {
overflow: scroll;
/* Fix shadow */
margin: 0px -16px;
padding: 0px 16px;
padding: 0px 0px 0px 16px;
}
#pallist.simplified .lstI.selected {
@ -1433,7 +1438,7 @@ TD .checkmark, TD .radiomark {
.expanded {
display: inline-block !important;
}
.hide, .expanded .segin.hide, .expanded .presin.hide, .expanded .sbs.hide, .expanded .frz, .expanded .g-icon, .nosimple {
.hide, .expanded .segin.hide, .expanded .presin.hide, .expanded .sbs.hide, .expanded .frz, .expanded .g-icon {
display: none !important;
}

View File

@ -626,7 +626,7 @@ function parseInfo(i) {
if (i.live) name = "(Live) " + name;
if (loc) name = "(L) " + name;
d.title = name;
simplifiedUI = i.simplifiedui;
simplifiedUI = i.simplifiedui | true;
ledCount = i.leds.count;
//syncTglRecv = i.str;
maxSeg = i.leds.maxseg;
@ -752,6 +752,7 @@ function populateSegments(s)
let rvXck = `<label class="check revchkl">Reverse ${isM?'':'direction'}<input type="checkbox" id="seg${i}rev" onchange="setRev(${i})" ${inst.rev?"checked":""}><span class="checkmark"></span></label>`;
let miXck = `<label class="check revchkl">Mirror<input type="checkbox" id="seg${i}mi" onchange="setMi(${i})" ${inst.mi?"checked":""}><span class="checkmark"></span></label>`;
let rvYck = "", miYck ="";
let smpl = simplifiedUI ? 'hide' : '';
if (isMSeg) {
rvYck = `<label class="check revchkl">Reverse<input type="checkbox" id="seg${i}rY" onchange="setRevY(${i})" ${inst.rY?"checked":""}><span class="checkmark"></span></label>`;
miYck = `<label class="check revchkl">Mirror<input type="checkbox" id="seg${i}mY" onchange="setMiY(${i})" ${inst.mY?"checked":""}><span class="checkmark"></span></label>`;
@ -771,22 +772,22 @@ function populateSegments(s)
`</select></div>`+
`</div>`;
cn += `<div class="seg lstI ${i==s.mainseg && !simplifiedUI ? 'selected' : ''} ${exp ? "expanded":""}" id="seg${i}" data-set="${inst.set}">`+
`<label class="check schkl ${simplifiedUI ? 'nosimple' : ''}">`+
`<label class="check schkl ${smpl}">`+
`<input type="checkbox" id="seg${i}sel" onchange="selSeg(${i})" ${inst.sel ? "checked":""}>`+
`<span class="checkmark"></span>`+
`</label>`+
`<div class="segname" onclick="selSegEx(${i})">`+
`<i class="icons e-icon frz ${simplifiedUI ? 'nosimple' : ''}" id="seg${i}frz" onclick="event.preventDefault();tglFreeze(${i});">&#x${inst.frz ? (li.live && li.liveseg==i?'e410':'e0e8') : 'e325'};</i>`+
`<div class="segname ${smpl}" onclick="selSegEx(${i})">`+
`<i class="icons e-icon frz" id="seg${i}frz" onclick="event.preventDefault();tglFreeze(${i});">&#x${inst.frz ? (li.live && li.liveseg==i?'e410':'e0e8') : 'e325'};</i>`+
(inst.n ? inst.n : "Segment "+i) +
`<div class="pop hide ${simplifiedUI ? 'nosimple' : ''}" onclick="event.preventDefault();event.stopPropagation();">`+
`<div class="pop hide" onclick="event.preventDefault();event.stopPropagation();">`+
`<i class="icons g-icon" style="color:${cG};" onclick="this.nextElementSibling.classList.toggle('hide');">&#x278${String.fromCharCode(inst.set+"A".charCodeAt(0))};</i>`+
`<div class="pop-c hide"><span style="color:var(--c-f);" onclick="setGrp(${i},0);">&#x278A;</span><span style="color:var(--c-r);" onclick="setGrp(${i},1);">&#x278B;</span><span style="color:var(--c-g);" onclick="setGrp(${i},2);">&#x278C;</span><span style="color:var(--c-l);" onclick="setGrp(${i},3);">&#x278D;</span></div>`+
`</div> `+
`<i class="icons edit-icon flr ${simplifiedUI ? 'nosimple' : ''}" id="seg${i}nedit" onclick="tglSegn(${i})">&#xe2c6;</i>`+
`<i class="icons edit-icon flr ${smpl}" id="seg${i}nedit" onclick="tglSegn(${i})">&#xe2c6;</i>`+
`</div>`+
`<i class="icons e-icon flr ${simplifiedUI ? 'nosimple' : ''}" id="sege${i}" onclick="expand(${i})">&#xe395;</i>`+
`<i class="icons e-icon flr ${smpl}" id="sege${i}" onclick="expand(${i})">&#xe395;</i>`+
(cfg.comp.segpwr ? segp : '') +
`<div class="segin ${simplifiedUI ? 'nosimple' : ''}" id="seg${i}in">`+
`<div class="segin ${smpl}" id="seg${i}in">`+
`<input type="text" class="ptxt" id="seg${i}t" autocomplete="off" maxlength=${li.arch=="esp8266"?32:64} value="${inst.n?inst.n:""}" placeholder="Enter name..."/>`+
`<table class="infot segt">`+
`<tr>`+
@ -836,6 +837,8 @@ function populateSegments(s)
}
gId('segcont').innerHTML = cn;
if (simplifiedUI) gId('segcont').classList.add("simple");
else gId('segcont').classList.remove("simple");
let noNewSegs = (lowestUnused >= maxSeg);
resetUtil(noNewSegs);
if (gId('selall')) gId('selall').checked = true;