hide settings for disabled features
This is a temporary solution, similar to SRWLED 0.13.3. It could be replaced once my PR to upstream gets accepted: https://github.com/Aircoookie/WLED/pull/2865
This commit is contained in:
@@ -510,10 +510,18 @@ void getSettingsJS(byte subPage, char* dest)
|
||||
sappends('s',SET_F("AI"),alexaInvocationName);
|
||||
sappend('c',SET_F("SA"),notifyAlexa);
|
||||
sappend('v',SET_F("AP"),alexaNumPresets);
|
||||
#ifndef WLED_DISABLE_ALEXA
|
||||
oappend(SET_F("hideNoALEXA();")); // hide "not compiled in" message
|
||||
#else
|
||||
oappend(SET_F("hideALEXA();")); // hide Alexa settings if not compiled in
|
||||
#endif
|
||||
sappends('s',SET_F("BK"),(char*)((blynkEnabled)?SET_F("Hidden"):""));
|
||||
#ifndef WLED_DISABLE_BLYNK
|
||||
sappends('s',SET_F("BH"),blynkHost);
|
||||
sappend('v',SET_F("BP"),blynkPort);
|
||||
oappend(SET_F("hideNoBLYNK();")); // hide "not compiled in" message
|
||||
#else
|
||||
oappend(SET_F("hideBLYNK();")); // hide BLYNK settings if not compiled in
|
||||
#endif
|
||||
|
||||
#ifdef WLED_ENABLE_MQTT
|
||||
@@ -530,6 +538,9 @@ void getSettingsJS(byte subPage, char* dest)
|
||||
sappends('s',"MD",mqttDeviceTopic);
|
||||
sappends('s',SET_F("MG"),mqttGroupTopic);
|
||||
sappend('c',SET_F("BM"),buttonPublishMqtt);
|
||||
oappend(SET_F("hideNoMQTT();")); // hide "not compiled in" message
|
||||
#else
|
||||
oappend(SET_F("hideMQTT();")); // hide MQTT settings if not compiled in
|
||||
#endif
|
||||
|
||||
#ifndef WLED_DISABLE_HUESYNC
|
||||
@@ -557,6 +568,9 @@ void getSettingsJS(byte subPage, char* dest)
|
||||
}
|
||||
|
||||
sappends('m',SET_F("(\"sip\")[0]"),hueErrorString);
|
||||
oappend(SET_F("hideNoHUE();")); // hide "not compiled in" message
|
||||
#else
|
||||
oappend(SET_F("hideHUE();")); // hide Hue Sync settings if not compiled in
|
||||
#endif
|
||||
sappend('v',SET_F("BD"),serialBaud);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user