mirror of
https://github.com/wled/WLED.git
synced 2025-04-23 22:37:18 +00:00
Replaced fixed color values in CSS & JS w/ --c-?.
This commit is contained in:
parent
eb966ec041
commit
a8b59f5f59
@ -16,7 +16,9 @@
|
||||
--c-c: #ccc;
|
||||
--c-e: #eee;
|
||||
--c-d: #ddd;
|
||||
--c-r: #831;
|
||||
--c-r: #e42;
|
||||
--c-g: #4e2;
|
||||
--c-l: #48a;
|
||||
--t-b: 0.5;
|
||||
--c-o: rgba(34, 34, 34, 0.9);
|
||||
--c-tb : rgba(34, 34, 34, var(--t-b));
|
||||
@ -979,10 +981,6 @@ input[type=number]::-webkit-outer-spin-button {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#fxlist .lstI.sticky {
|
||||
top: 99px;
|
||||
}
|
||||
|
||||
#fxlist .lstI.selected {
|
||||
top: 142px;
|
||||
}
|
||||
@ -990,7 +988,10 @@ input[type=number]::-webkit-outer-spin-button {
|
||||
#pallist .lstI.selected {
|
||||
top: 84px;
|
||||
}
|
||||
|
||||
/* must be after .selected */
|
||||
#fxlist .lstI.sticky {
|
||||
top: 99px;
|
||||
}
|
||||
#pallist .lstI.sticky {
|
||||
top: 42px;
|
||||
}
|
||||
|
@ -121,7 +121,9 @@ function cTheme(light) {
|
||||
sCol('--c-c','#333');
|
||||
sCol('--c-e','#111');
|
||||
sCol('--c-d','#222');
|
||||
sCol('--c-r','#c42');
|
||||
sCol('--c-r','#c21');
|
||||
sCol('--c-g','#2c1');
|
||||
sCol('--c-l','#26c');
|
||||
sCol('--c-o','rgba(204, 204, 204, 0.9)');
|
||||
sCol('--c-sb','#0003'); sCol('--c-sbh','#0006');
|
||||
sCol('--c-tb','rgba(204, 204, 204, var(--t-b))');
|
||||
@ -141,7 +143,9 @@ function cTheme(light) {
|
||||
sCol('--c-c','#ccc');
|
||||
sCol('--c-e','#eee');
|
||||
sCol('--c-d','#ddd');
|
||||
sCol('--c-r','#831');
|
||||
sCol('--c-r','#e42');
|
||||
sCol('--c-g','#4e2');
|
||||
sCol('--c-l','#48a');
|
||||
sCol('--c-o','rgba(34, 34, 34, 0.9)');
|
||||
sCol('--c-sb','#fff3'); sCol('--c-sbh','#fff5');
|
||||
sCol('--c-tb','rgba(34, 34, 34, var(--t-b))');
|
||||
@ -280,7 +284,7 @@ function openTab(tabI, force = false)
|
||||
var timeout;
|
||||
function showToast(text, error = false)
|
||||
{
|
||||
if (error) gId('connind').style.backgroundColor = "#831";
|
||||
if (error) gId('connind').style.backgroundColor = "var(--c-r)";
|
||||
var x = gId("toast");
|
||||
x.innerHTML = text;
|
||||
x.className = error ? "error":"show";
|
||||
@ -1076,7 +1080,7 @@ function makeWS() {
|
||||
jsonTimeout = null;
|
||||
lastUpdate = new Date();
|
||||
clearErrorToast();
|
||||
gId('connind').style.backgroundColor = "#079";
|
||||
gId('connind').style.backgroundColor = "var(--c-l)";
|
||||
// json object should contain json.info AND json.state (but may not)
|
||||
var info = json.info;
|
||||
if (info) {
|
||||
@ -1101,7 +1105,7 @@ function makeWS() {
|
||||
readState(s);
|
||||
};
|
||||
ws.onclose = function(event) {
|
||||
gId('connind').style.backgroundColor = "#831";
|
||||
gId('connind').style.backgroundColor = "var(--c-r)";
|
||||
ws = null;
|
||||
}
|
||||
ws.onopen = function(event) {
|
||||
@ -1199,7 +1203,7 @@ var reqsLegal = false;
|
||||
|
||||
function requestJson(command=null)
|
||||
{
|
||||
gId('connind').style.backgroundColor = "#a90";
|
||||
gId('connind').style.backgroundColor = "var(--c-r)";
|
||||
if (command && !reqsLegal) return; //stop post requests from chrome onchange event on page restore
|
||||
if (!jsonTimeout) jsonTimeout = setTimeout(showErrorToast, 3000);
|
||||
if (!command) command = {'v':true};
|
||||
@ -1239,7 +1243,7 @@ function requestJson(command=null)
|
||||
jsonTimeout = null;
|
||||
lastUpdate = new Date();
|
||||
clearErrorToast();
|
||||
gId('connind').style.backgroundColor = "#070";
|
||||
gId('connind').style.backgroundColor = "var(--c-g)";
|
||||
if (!json) { showToast('Empty response', true); return; }
|
||||
if (json.success) return;
|
||||
var s = json.state ? json.state : json;
|
||||
@ -1781,7 +1785,7 @@ function delP(i) {
|
||||
delete pJson[i];
|
||||
populatePresets();
|
||||
} else {
|
||||
bt.style.color = "#f00";
|
||||
bt.style.color = "var(--c-r)";
|
||||
bt.innerHTML = "<i class='icons btn-icon'></i>Delete!";
|
||||
bt.dataset.cnf = 1;
|
||||
}
|
||||
@ -1893,7 +1897,7 @@ function cnfReset()
|
||||
{
|
||||
if (!cnfr) {
|
||||
var bt = gId('resetbtn');
|
||||
bt.style.color = "#f00";
|
||||
bt.style.color = "var(--c-r)";
|
||||
bt.innerHTML = "Confirm Reboot";
|
||||
cnfr = true; return;
|
||||
}
|
||||
@ -1905,12 +1909,12 @@ function rSegs()
|
||||
{
|
||||
var bt = gId('rsbtn');
|
||||
if (!cnfrS) {
|
||||
bt.style.color = "#f00";
|
||||
bt.style.color = "var(--c-r)";
|
||||
bt.innerHTML = "Confirm reset";
|
||||
cnfrS = true; return;
|
||||
}
|
||||
cnfrS = false;
|
||||
bt.style.color = "#fff";
|
||||
bt.style.color = "var(--c-f)";
|
||||
bt.innerHTML = "Reset segments";
|
||||
var obj = {"seg":[{"start":0,"stop":ledCount,"sel":true}]};
|
||||
for (let i=1; i<=lSeg; i++) obj.seg.push({"stop":0});
|
||||
|
@ -16,7 +16,9 @@
|
||||
--c-c: #ccc;
|
||||
--c-e: #eee;
|
||||
--c-d: #ddd;
|
||||
--c-r: #831;
|
||||
--c-r: #e42;
|
||||
--c-g: #4e2;
|
||||
--c-l: #48a;
|
||||
--t-b: 0.5;
|
||||
--c-o: rgba(34, 34, 34, 0.9);
|
||||
--c-tb : rgba(34, 34, 34, var(--t-b));
|
||||
|
@ -114,7 +114,9 @@ function cTheme(light) {
|
||||
sCol('--c-c','#333');
|
||||
sCol('--c-e','#111');
|
||||
sCol('--c-d','#222');
|
||||
sCol('--c-r','#c42');
|
||||
sCol('--c-r','#c21');
|
||||
sCol('--c-g','#2c1');
|
||||
sCol('--c-l','#26c');
|
||||
sCol('--c-o','rgba(204, 204, 204, 0.9)');
|
||||
sCol('--c-sb','#0003'); sCol('--c-sbh','#0006');
|
||||
sCol('--c-tb','rgba(204, 204, 204, var(--t-b))');
|
||||
@ -134,7 +136,9 @@ function cTheme(light) {
|
||||
sCol('--c-c','#ccc');
|
||||
sCol('--c-e','#eee');
|
||||
sCol('--c-d','#ddd');
|
||||
sCol('--c-r','#831');
|
||||
sCol('--c-r','#e42');
|
||||
sCol('--c-g','#4e2');
|
||||
sCol('--c-l','#48a');
|
||||
sCol('--c-o','rgba(34, 34, 34, 0.9)');
|
||||
sCol('--c-sb','#fff3'); sCol('--c-sbh','#fff5');
|
||||
sCol('--c-tb','rgba(34, 34, 34, var(--t-b))');
|
||||
@ -250,7 +254,7 @@ async function onLoad()
|
||||
var timeout;
|
||||
function showToast(text, error = false)
|
||||
{
|
||||
if (error) gId('connind').style.backgroundColor = "#831";
|
||||
if (error) gId('connind').style.backgroundColor = "var(--c-r)";
|
||||
var x = gId("toast");
|
||||
x.innerHTML = text;
|
||||
x.className = error ? "error":"show";
|
||||
@ -850,7 +854,7 @@ function makeWS() {
|
||||
jsonTimeout = null;
|
||||
lastUpdate = new Date();
|
||||
clearErrorToast();
|
||||
gId('connind').style.backgroundColor = "#079";
|
||||
gId('connind').style.backgroundColor = "var(--c-l)";
|
||||
// json object should contain json.info AND json.state (but may not)
|
||||
var info = json.info;
|
||||
if (info) {
|
||||
@ -873,7 +877,7 @@ function makeWS() {
|
||||
readState(s);
|
||||
};
|
||||
ws.onclose = function(event) {
|
||||
gId('connind').style.backgroundColor = "#831";
|
||||
gId('connind').style.backgroundColor = "var(--c-r)";
|
||||
ws = null;
|
||||
}
|
||||
ws.onopen = function(event) {
|
||||
@ -969,7 +973,7 @@ var reqsLegal = false;
|
||||
|
||||
function requestJson(command=null)
|
||||
{
|
||||
gId('connind').style.backgroundColor = "#a90";
|
||||
gId('connind').style.backgroundColor = "var(--c-r)";
|
||||
if (command && !reqsLegal) return; //stop post requests from chrome onchange event on page restore
|
||||
if (!jsonTimeout) jsonTimeout = setTimeout(showErrorToast, 3000);
|
||||
if (!command) command = {'v':true};
|
||||
@ -1005,7 +1009,7 @@ function requestJson(command=null)
|
||||
jsonTimeout = null;
|
||||
lastUpdate = new Date();
|
||||
clearErrorToast();
|
||||
gId('connind').style.backgroundColor = "#070";
|
||||
gId('connind').style.backgroundColor = "var(--c-g)";
|
||||
if (!json) { showToast('Empty response', true); return; }
|
||||
if (json.success) return;
|
||||
var s = json.state ? json.state : json;
|
||||
|
3022
wled00/html_simple.h
3022
wled00/html_simple.h
File diff suppressed because it is too large
Load Diff
4459
wled00/html_ui.h
4459
wled00/html_ui.h
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
// version code in format yymmddb (b = daily build)
|
||||
#define VERSION 2108121
|
||||
#define VERSION 2108131
|
||||
|
||||
//uncomment this if you have a "my_config.h" file you'd like to use
|
||||
//#define WLED_USE_MY_CONFIG
|
||||
|
Loading…
x
Reference in New Issue
Block a user