mirror of
https://github.com/wled/WLED.git
synced 2025-04-23 14:27:18 +00:00
Enable simplifiedUI by default
This commit is contained in:
parent
3ee3b97255
commit
e4ec65622f
@ -31,9 +31,7 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
|
||||
getStringFromJson(cmDNS, id[F("mdns")], 33);
|
||||
getStringFromJson(serverDescription, id[F("name")], 33);
|
||||
getStringFromJson(alexaInvocationName, id[F("inv")], 33);
|
||||
#ifdef WLED_ENABLE_SIMPLE_UI
|
||||
CJSON(simplifiedUI, id[F("sui")]);
|
||||
#endif
|
||||
|
||||
JsonObject nw = doc["nw"];
|
||||
#ifndef WLED_DISABLE_ESPNOW
|
||||
@ -656,9 +654,7 @@ void serializeConfig() {
|
||||
id[F("mdns")] = cmDNS;
|
||||
id[F("name")] = serverDescription;
|
||||
id[F("inv")] = alexaInvocationName;
|
||||
#ifdef WLED_ENABLE_SIMPLE_UI
|
||||
id[F("sui")] = simplifiedUI;
|
||||
#endif
|
||||
|
||||
JsonObject nw = doc.createNestedObject("nw");
|
||||
#ifndef WLED_DISABLE_ESPNOW
|
||||
|
@ -267,10 +267,7 @@
|
||||
<h2>Web Setup</h2>
|
||||
Server description: <input type="text" name="DS" maxlength="32"><br>
|
||||
<!-- Sync button toggles both send and receive: <input type="checkbox" name="ST"><br> -->
|
||||
<div id="NoSimple" class="hide">
|
||||
<i class="warn">This firmware build does not include simplified UI support.<br></i>
|
||||
</div>
|
||||
<div id="Simple">Enable simplified UI: <input type="checkbox" name="SU"><br></div>
|
||||
Enable simplified UI: <input type="checkbox" name="SU"><br>
|
||||
<i>The following UI customization settings are unique both to the WLED device and this browser.<br>
|
||||
You will need to set them again if using a different browser, device or WLED IP address.<br>
|
||||
Refresh the main UI to apply changes.</i><br>
|
||||
|
@ -296,13 +296,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
|
||||
{
|
||||
strlcpy(serverDescription, request->arg(F("DS")).c_str(), 33);
|
||||
//syncToggleReceive = request->hasArg(F("ST"));
|
||||
#ifdef WLED_ENABLE_SIMPLE_UI
|
||||
if (simplifiedUI ^ request->hasArg(F("SU"))) {
|
||||
// UI selection changed, invalidate browser cache
|
||||
cacheInvalidate++;
|
||||
}
|
||||
simplifiedUI = request->hasArg(F("SU"));
|
||||
#endif
|
||||
DEBUG_PRINTLN(F("Enumerating ledmaps"));
|
||||
enumerateLedmaps();
|
||||
DEBUG_PRINTLN(F("Loading custom palettes"));
|
||||
|
@ -365,7 +365,7 @@ WLED_GLOBAL char serverDescription[33] _INIT(SERVERNAME); // use predefined nam
|
||||
#endif
|
||||
//WLED_GLOBAL bool syncToggleReceive _INIT(false); // UIs which only have a single button for sync should toggle send+receive if this is true, only send otherwise
|
||||
WLED_GLOBAL bool simplifiedUI _INIT(false); // enable simplified UI
|
||||
WLED_GLOBAL byte cacheInvalidate _INIT(0); // used to invalidate browser cache when switching from regular to simplified UI
|
||||
WLED_GLOBAL byte cacheInvalidate _INIT(0); // used to invalidate browser cache
|
||||
|
||||
// Sync CONFIG
|
||||
WLED_GLOBAL NodesMap Nodes;
|
||||
|
@ -475,11 +475,7 @@ void getSettingsJS(byte subPage, char* dest)
|
||||
{
|
||||
sappends('s',SET_F("DS"),serverDescription);
|
||||
//sappend('c',SET_F("ST"),syncToggleReceive);
|
||||
#ifdef WLED_ENABLE_SIMPLE_UI
|
||||
sappend('c',SET_F("SU"),simplifiedUI);
|
||||
#else
|
||||
oappend(SET_F("toggle('Simple');")); // hide Simplified UI settings
|
||||
#endif
|
||||
}
|
||||
|
||||
if (subPage == SUBPAGE_SYNC)
|
||||
|
Loading…
x
Reference in New Issue
Block a user