Skip to content

Commit

Permalink
minor formatting (newlines, blank lines with spaces, trailing spaces)
Browse files Browse the repository at this point in the history
  • Loading branch information
andyshinn committed Jan 23, 2021
1 parent 6a69cde commit 1f8d530
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 60 deletions.
62 changes: 31 additions & 31 deletions wled00/data/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ body {
-ms-user-select: none;
user-select: none;
-webkit-tap-highlight-color: transparent;
scrollbar-width: 6px;
scrollbar-color: var(--c-sb) transparent;
scrollbar-width: 6px;
scrollbar-color: var(--c-sb) transparent;
}

html,
Expand Down Expand Up @@ -214,7 +214,7 @@ button {

.top button {
padding: var(--tbp);
}
}

.bot button {
padding: var(--bbp);
Expand Down Expand Up @@ -263,7 +263,7 @@ button {
padding-top: 0;
margin-top: 11px;
height: calc(100% - 11px);
-webkit-overflow-scrolling: touch;
-webkit-overflow-scrolling: touch;
}

.smooth { transition: transform calc(var(--f, 1)*.5s) ease-out }
Expand Down Expand Up @@ -313,7 +313,7 @@ button {

#fxb0 {
margin-bottom: 2px;
filter: drop-shadow(0 0 1px #000);
filter: drop-shadow(0 0 1px #000);
}

.first {
Expand Down Expand Up @@ -432,16 +432,16 @@ img {
}

.sliderbubble {
width: 36px;
line-height: 24px;
background: var(--c-3);
position: absolute;
transform: translateX(-50%);
border-radius: 12px;
margin-left: 12px;
margin-top: 3px;
padding: 0px;
display: inline;
width: 36px;
line-height: 24px;
background: var(--c-3);
position: absolute;
transform: translateX(-50%);
border-radius: 12px;
margin-left: 12px;
margin-top: 3px;
padding: 0px;
display: inline;
}

.hidden {
Expand Down Expand Up @@ -633,7 +633,7 @@ textarea {
}

::selection {
background: var(--c-b);
background: var(--c-b);
}

input[type=text] {
Expand All @@ -655,8 +655,8 @@ input[type=number]:focus, input[type=text]:focus {
background: var(--c-6);
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
}

Expand All @@ -683,13 +683,13 @@ input[type=number]::-webkit-outer-spin-button {
}

.pid {
position: absolute;
top: 0px;
left: 0px;
padding: 11px 0px 0px 11px;
font-size: 16px;
width: 20px;
text-align: center;
position: absolute;
top: 0px;
left: 0px;
padding: 11px 0px 0px 11px;
font-size: 16px;
width: 20px;
text-align: center;
color: var(--c-b);
}

Expand Down Expand Up @@ -729,7 +729,7 @@ input[type=number]::-webkit-outer-spin-button {
}

.pwr {
color: var(--c-6);
color: var(--c-6);
transform: translate(2px, 3px);
cursor: pointer;
}
Expand Down Expand Up @@ -860,7 +860,7 @@ input[type=number]::-webkit-outer-spin-button {
border-radius: 20px;
text-align: left;
transition: background-color 0.5s;
filter: brightness(1);
filter: brightness(1);
}

.pres {
Expand Down Expand Up @@ -893,7 +893,7 @@ input[type=number]::-webkit-outer-spin-button {
width: 6px;
}
::-webkit-scrollbar-track {
background: transparent;
background: transparent;
}
::-webkit-scrollbar-thumb {
background: var(--c-sb);
Expand All @@ -906,8 +906,8 @@ input[type=number]::-webkit-outer-spin-button {

@media all and (max-width: 335px) {
.sliderbubble {
display: none;
}
display: none;
}
}

@media all and (max-width: 550px) and (min-width: 374px) {
Expand All @@ -934,4 +934,4 @@ input[type=number]::-webkit-outer-spin-button {
#buttonPcm {
display: none;
}
}
}
58 changes: 29 additions & 29 deletions wled00/data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ var cpick = new iro.ColorPicker("#picker", {
wheelLightness: false,
wheelAngle: 90,
layout: [
{
{
component: iro.ui.Wheel,
options: {}
},
{
{
component: iro.ui.Slider,
options: {
sliderType: 'value'
}
},
{
{
component: iro.ui.Slider,
options: {
sliderType: 'kelvin',
Expand Down Expand Up @@ -177,12 +177,12 @@ function onLoad() {
}
var sett = localStorage.getItem('wledUiCfg');
if (sett) cfg = mergeDeep(cfg, JSON.parse(sett));

resetPUtil();

applyCfg();
loadBg(cfg.theme.bg.url);

var cd = d.getElementById('csl').children;
for (var i = 0; i < cd.length; i++) {
cd[i].style.backgroundColor = "rgb(0, 0, 0)";
Expand Down Expand Up @@ -233,7 +233,7 @@ function showToast(text, error = false) {
x.className = error ? "error":"show";
clearTimeout(timeout);
x.style.animation = 'none';
x.style.animation = null;
x.style.animation = null;
timeout = setTimeout(function(){ x.className = x.className.replace("show", ""); }, 2900);
}

Expand All @@ -255,7 +255,7 @@ function getRuntimeStr(rt)
if (!days && hrs) str += ", ";
if (t > 59 && !days) str += mins + " min";
if (t < 3600 && t > 59) str += ", ";
if (t < 3600) str += (t - mins*60) + " sec";
if (t < 3600) str += (t - mins*60) + " sec";
return str;
}

Expand All @@ -271,7 +271,7 @@ function getLowestUnusedP()
{
if (key == l) l++;
}
if (l > 250) l = 250;
if (l > 250) l = 250;
return l;
}

Expand Down Expand Up @@ -311,7 +311,7 @@ function cpBck() {
copyText.setSelectionRange(0, 999999);

document.execCommand("copy");

showToast("Copied to clipboard!");
}

Expand All @@ -322,12 +322,12 @@ function presetError(empty)
bckstr = localStorage.getItem("wledP");
if (bckstr.length > 10) hasBackup = true;
} catch (e) {

}
var cn = `<div class="seg c">`;
if (empty)
if (empty)
cn += `You have no presets yet!`;
else
else
cn += `Sorry, there was an issue loading your presets!`;

if (hasBackup) {
Expand All @@ -351,7 +351,7 @@ function loadPresets()
if (loc) {
url = `http://${locip}/presets.json`;
}

fetch
(url, {
method: 'get'
Expand Down Expand Up @@ -380,7 +380,7 @@ function populateQL()
var cn = "";
if (pQL.length > 0) {
cn += `<p class="labels">Quick load</p>`;

var it = 0;
for (var key of (pQL||[]))
{
Expand All @@ -392,7 +392,7 @@ function populateQL()
}
}
if (it != 0) cn+= '<br>';

cn += `<p class="labels">All presets</p>`;
}
d.getElementById('pql').innerHTML = cn;
Expand All @@ -416,7 +416,7 @@ function populatePresets(fromls)
var qll = key[1].ql;
if (qll) pQL.push([i, qll]);
is.push(i);

cn += `<div class="seg pres" id="p${i}o">`;
if (cfg.comp.pid) cn += `<div class="pid">${i}</div>`;
cn += `<div class="segname pname" onclick="setPreset(${i})">${pName(i)}</div>
Expand Down Expand Up @@ -466,7 +466,7 @@ function populateInfo(i)
var vcn = "Kuuhaku";
if (i.ver.startsWith("0.11.")) vcn = "Mirai";
if (i.cn) vcn = i.cn;

cn += `v${i.ver} "${vcn}"<br><br><table class="infot">
${urows}
${inforow("Build",i.vid)}
Expand All @@ -485,17 +485,17 @@ function populateSegments(s)
{
var cn = "";
segCount = 0; lowestUnused = 0; lSeg = 0;

for (var y = 0; y < (s.seg||[]).length; y++)
{
segCount++;

var inst=s.seg[y];
let i = parseInt(inst.id);
powered[i] = inst.on;
if (i == lowestUnused) lowestUnused = i+1;
if (i > lSeg) lSeg = i;

cn += `<div class="seg">
<label class="check schkl">
&nbsp;
Expand Down Expand Up @@ -608,7 +608,7 @@ function updateLen(s)
} else if (len == 1) {
out = "1 LED";
}

if (d.getElementById(`seg${s}grp`) != null)
{
var grp = parseInt(d.getElementById(`seg${s}grp`).value);
Expand All @@ -617,7 +617,7 @@ function updateLen(s)
var virt = Math.ceil(len/(grp + spc));
if (!isNaN(virt) && (grp > 1 || spc > 0)) out += ` (${virt} virtual)`;
}

d.getElementById(`seg${s}len`).innerHTML = out;
}

Expand Down Expand Up @@ -690,7 +690,7 @@ function requestJson(command, rinfo = true, verbose = true) {
if (loc) {
url = `http://${locip}${url}`;
}

var type = command ? 'post':'get';
if (command)
{
Expand Down Expand Up @@ -745,7 +745,7 @@ function requestJson(command, rinfo = true, verbose = true) {
}
e1.innerHTML=x; e2.innerHTML=y;
}

var info = json.info;
var name = info.name;
d.getElementById('namelabel').innerHTML = name;
Expand Down Expand Up @@ -778,7 +778,7 @@ function requestJson(command, rinfo = true, verbose = true) {
d.getElementById('cyce').value = s.ccnf.max;
d.getElementById('cyct').value = s.ccnf.time /10;
d.getElementById('cyctt').value = s.transition /10;

var selc=0; var ind=0;
populateSegments(s);
for (let i = 0; i < (s.seg||[]).length; i++)
Expand Down Expand Up @@ -1068,7 +1068,7 @@ function toggleCY() {
obj = {"pl": 0, "ccnf": {"min": parseInt(d.getElementById('cycs').value), "max": parseInt(d.getElementById('cyce').value), "time": parseInt(d.getElementById('cyct').value*10)}};
obj.transition = parseInt(d.getElementById('cyctt').value*10);
}

requestJson(obj);
}

Expand Down Expand Up @@ -1352,7 +1352,7 @@ function move(e) {
x0 = null;
}

function size() {
function size() {
w = window.innerWidth;
var h = d.getElementById('top').clientHeight;
sCol('--th', h + "px");
Expand Down Expand Up @@ -1413,4 +1413,4 @@ _C.addEventListener('touchstart', lock, false);

_C.addEventListener('mouseout', move, false);
_C.addEventListener('mouseup', move, false);
_C.addEventListener('touchend', move, false);
_C.addEventListener('touchend', move, false);

0 comments on commit 1f8d530

Please sign in to comment.