UI update.
This commit is contained in:
@@ -1256,7 +1256,7 @@ TD .checkmark, TD .radiomark {
|
||||
position: relative;
|
||||
width: 280px;
|
||||
transition: background-color 0.5s;
|
||||
margin: auto auto 20px;
|
||||
margin: auto auto 10px;
|
||||
font-size: 19px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
@@ -198,6 +198,10 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-bottom: 10px;">
|
||||
<button class="btn btn-xs" type="button" onclick="window.location.href=(loc?'http://'+locip:'')+'/cpal.htm'"><i class="icons btn-icon"></i></button>
|
||||
<button class="btn btn-xs" type="button" onclick="palettesData=null;localStorage.removeItem('wledPalx');requestJson({rmcpal:true});setTimeout(loadPalettes,250,loadPalettesData);"><i class="icons btn-icon"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -883,8 +883,21 @@ function populatePalettes()
|
||||
`<div class="lstIprev" style="${genPalPrevCss(pa[0])}"></div>`
|
||||
);
|
||||
}
|
||||
|
||||
gId('pallist').innerHTML=html;
|
||||
// append custom palettes (when loading for the 1st time)
|
||||
if (!isEmpty(lastinfo) && lastinfo.cpalcount) {
|
||||
for (let j = 0; j<lastinfo.cpalcount; j++) {
|
||||
let div = d.createElement("div");
|
||||
gId('pallist').appendChild(div);
|
||||
div.outerHTML = generateListItemHtml(
|
||||
'palette',
|
||||
255-j,
|
||||
'~ Custom '+j+' ~',
|
||||
'setPalette',
|
||||
`<div class="lstIprev" style="${genPalPrevCss(255-j)}"></div>`
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function redrawPalPrev()
|
||||
@@ -1587,21 +1600,8 @@ function requestJson(command=null)
|
||||
if (json.success) return;
|
||||
if (json.info) {
|
||||
let i = json.info;
|
||||
// append custom palettes (when loading for the 1st time)
|
||||
if (!command && isEmpty(lastinfo) && i.cpalcount) {
|
||||
for (let j = 0; j<i.cpalcount; j++) {
|
||||
let div = d.createElement("div");
|
||||
gId('pallist').appendChild(div);
|
||||
div.outerHTML = generateListItemHtml(
|
||||
'palette',
|
||||
255-j,
|
||||
'~ Custom '+j+' ~',
|
||||
'setPalette',
|
||||
`<div class="lstIprev" style="${genPalPrevCss(255-j)}"></div>`
|
||||
);
|
||||
}
|
||||
}
|
||||
parseInfo(i);
|
||||
populatePalettes(i);
|
||||
if (isInfo) populateInfo(i);
|
||||
}
|
||||
var s = json.state ? json.state : json;
|
||||
|
||||
Reference in New Issue
Block a user