Browse Source

Hide relay tab on webUI for devices without relays

fastled
Xose Pérez 6 years ago
parent
commit
410c56a4d9
4 changed files with 2526 additions and 2522 deletions
  1. BIN
      code/espurna/data/index.html.gz
  2. +4
    -0
      code/espurna/relay.ino
  3. +2521
    -2521
      code/espurna/static/index.html.gz.h
  4. +1
    -1
      code/html/index.html

BIN
code/espurna/data/index.html.gz View File


+ 4
- 0
code/espurna/relay.ino View File

@ -367,6 +367,10 @@ void _relayWebSocketUpdate() {
void _relayWebSocketOnSend(JsonObject& root) { void _relayWebSocketOnSend(JsonObject& root) {
if (relayCount() == 0) return;
root["relayVisible"] = 1;
// Statuses // Statuses
JsonArray& relay = root.createNestedArray("relayStatus"); JsonArray& relay = root.createNestedArray("relayStatus");
for (unsigned char relayID=0; relayID<relayCount(); relayID++) { for (unsigned char relayID=0; relayID<relayCount(); relayID++) {


+ 2521
- 2521
code/espurna/static/index.html.gz.h
File diff suppressed because it is too large
View File


+ 1
- 1
code/html/index.html View File

@ -98,7 +98,7 @@
<a href="#" class="pure-menu-link" data="panel-ntp">NTP</a> <a href="#" class="pure-menu-link" data="panel-ntp">NTP</a>
</li> </li>
<li class="pure-menu-item">
<li class="pure-menu-item module module-relay">
<a href="#" class="pure-menu-link" data="panel-relay">SWITCHES</a> <a href="#" class="pure-menu-link" data="panel-relay">SWITCHES</a>
</li> </li>


Loading…
Cancel
Save