Skip to content

Commit 37c9fd2

Browse files
authored
Merge pull request #3511 from WoodyLetsCode/simple-mode
New implementation of the simplified UI
2 parents 3d6fe0a + db17959 commit 37c9fd2

File tree

16 files changed

+2277
-5930
lines changed

16 files changed

+2277
-5930
lines changed

tools/cdata.js

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -219,36 +219,10 @@ function writeChunks(srcDir, specs, resultFile) {
219219
}
220220

221221
writeHtmlGzipped("wled00/data/index.htm", "wled00/html_ui.h", 'index');
222-
writeHtmlGzipped("wled00/data/simple.htm", "wled00/html_simple.h", 'simple');
223222
writeHtmlGzipped("wled00/data/pixart/pixart.htm", "wled00/html_pixart.h", 'pixart');
224223
writeHtmlGzipped("wled00/data/cpal/cpal.htm", "wled00/html_cpal.h", 'cpal');
225224
writeHtmlGzipped("wled00/data/pxmagic/pxmagic.htm", "wled00/html_pxmagic.h", 'pxmagic');
226-
/*
227-
writeChunks(
228-
"wled00/data",
229-
[
230-
{
231-
file: "simple.css",
232-
name: "PAGE_simpleCss",
233-
method: "gzip",
234-
filter: "css-minify",
235-
},
236-
{
237-
file: "simple.js",
238-
name: "PAGE_simpleJs",
239-
method: "gzip",
240-
filter: "js-minify",
241-
},
242-
{
243-
file: "simple.htm",
244-
name: "PAGE_simple",
245-
method: "gzip",
246-
filter: "html-minify-ui",
247-
}
248-
],
249-
"wled00/html_simplex.h"
250-
);
251-
*/
225+
252226
writeChunks(
253227
"wled00/data",
254228
[

wled00/cfg.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
3131
getStringFromJson(cmDNS, id[F("mdns")], 33);
3232
getStringFromJson(serverDescription, id[F("name")], 33);
3333
getStringFromJson(alexaInvocationName, id[F("inv")], 33);
34-
#ifdef WLED_ENABLE_SIMPLE_UI
3534
CJSON(simplifiedUI, id[F("sui")]);
36-
#endif
3735

3836
JsonObject nw = doc["nw"];
3937
#ifndef WLED_DISABLE_ESPNOW
@@ -655,9 +653,7 @@ void serializeConfig() {
655653
id[F("mdns")] = cmDNS;
656654
id[F("name")] = serverDescription;
657655
id[F("inv")] = alexaInvocationName;
658-
#ifdef WLED_ENABLE_SIMPLE_UI
659656
id[F("sui")] = simplifiedUI;
660-
#endif
661657

662658
JsonObject nw = doc.createNestedObject("nw");
663659
#ifndef WLED_DISABLE_ESPNOW

wled00/data/index.css

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,16 @@ button {
370370
padding: 5px 0 0;
371371
}
372372

373+
/* Quick load magin for simplified UI */
374+
.simplified #pql {
375+
margin-bottom: 8px;
376+
}
377+
378+
/* Button margin for simplified UI */
379+
.simplified #fx .btn, .simplified #palw .btn {
380+
margin-top: 0;
381+
}
382+
373383
.smooth { transition: transform calc(var(--f, 1)*.5s) ease-out }
374384

375385
.tab-label {
@@ -413,6 +423,7 @@ button {
413423
position: sticky;
414424
bottom: 0;
415425
max-width: 300px;
426+
z-index: 2;
416427
}
417428

418429
#sliders .labels {
@@ -754,13 +765,17 @@ input[type=range]::-moz-range-thumb {
754765
}
755766

756767
#Colors .sliderwrap {
757-
margin: 4px 0 0;
768+
margin: 2px 0 0;
758769
}
759770

760-
/* Dynamically hide brightness slider label */
771+
/* Dynamically hide labels */
761772
.hd {
762773
display: var(--bhd);
763774
}
775+
/* Do not hide quick load label in simplified mode on small screen widths */
776+
.simplified #pql .hd {
777+
display: var(--bhd) !important;
778+
}
764779

765780
#briwrap {
766781
min-width: 300px;
@@ -1284,6 +1299,12 @@ TD .checkmark, TD .radiomark {
12841299
margin-top: 0;
12851300
}
12861301

1302+
/* Simplify segments */
1303+
.simplified #segcont .lstI {
1304+
margin-top: 4px;
1305+
min-height: unset;
1306+
}
1307+
12871308
/* selected item/element */
12881309
.selected { /* has to be after .lstI since !important is not ok */
12891310
background: var(--c-4);
@@ -1324,6 +1345,19 @@ TD .checkmark, TD .radiomark {
13241345
top: calc(var(--sti) + 42px);
13251346
}
13261347

1348+
dialog::backdrop {
1349+
backdrop-filter: blur(10px);
1350+
-webkit-backdrop-filter: blur(10px);
1351+
}
1352+
dialog {
1353+
max-height: 70%;
1354+
border: 0;
1355+
border-radius: 10px;
1356+
background: linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.1)), var(--c-3);
1357+
box-shadow: 4px 4px 10px 4px var(--c-1);
1358+
color: var(--c-f);
1359+
}
1360+
13271361
#fxlist .lstI.sticky,
13281362
#pallist .lstI.sticky {
13291363
top: var(--sti);

wled00/data/index.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
<input id="hexc" tooltip="Hex RGB" type="text" class="noslide" onkeydown="hexEnter()" autocomplete="off" maxlength="8" />
169169
<button id="hexcnf" class="btn btn-xs" onclick="fromHex();"><i class="icons btn-icon">&#xe390;</i></button>
170170
</div>
171-
<div style="padding: 8px 0;">
171+
<div style="padding: 8px 0;" id="btns">
172172
<button class="btn btn-xs" tooltip="Pixel Magic Tool" type="button" id="pxmb" onclick="window.location.href=getURL('/pxmagic.htm')"><i class="icons btn-icon">&#xe410;</i></button>
173173
<button class="btn btn-xs" tooltip="Add custom palette" type="button" onclick="window.location.href=getURL('/cpal.htm')"><i class="icons btn-icon">&#xe18a;</i></button>
174174
<button class="btn btn-xs" tooltip="Remove custom palette" type="button" id="rmPal" onclick="palettesData=null;localStorage.removeItem('wledPalx');requestJson({rmcpal:true});setTimeout(loadPalettes,250,loadPalettesData);"><i class="icons btn-icon">&#xe037;</i></button>

0 commit comments

Comments
 (0)