Browse Source

Use full web UI image if device has more than one webui module (#981)

rfm69
Xose Pérez 6 years ago
parent
commit
cfbd071a71
4 changed files with 3127 additions and 8 deletions
  1. BIN
      code/espurna/data/index.all.html.gz
  2. +3079
    -0
      code/espurna/static/index.all.html.gz.h
  3. +46
    -7
      code/espurna/web.ino
  4. +2
    -1
      code/gulpfile.js

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


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


+ 46
- 7
code/espurna/web.ino View File

@ -17,14 +17,53 @@ Copyright (C) 2016-2018 by Xose Pérez <xose dot perez at gmail dot com>
#if WEB_EMBEDDED #if WEB_EMBEDDED
#define WEBUI_MODULE_SMALL 0
#define WEBUI_MODULE_LIGHT 1
#define WEBUI_MODULE_SENSOR 2
#define WEBUI_MODULE_RFBRIDGE 4
#define WEBUI_MODULE_ALL 7
#if LIGHT_PROVIDER != LIGHT_PROVIDER_NONE #if LIGHT_PROVIDER != LIGHT_PROVIDER_NONE
#include "static/index.light.html.gz.h"
#elif SENSOR_SUPPORT
#include "static/index.sensor.html.gz.h"
#elif defined(ITEAD_SONOFF_RFBRIDGE)
#include "static/index.rfbridge.html.gz.h"
#else
#include "static/index.small.html.gz.h"
#ifdef WEBUI_MODULE
#undef WEBUI_MODULE
#define WEBUI_MODULE WEBUI_MODULE_ALL
#else
#define WEBUI_MODULE WEBUI_MODULE_LIGHT
#endif
#endif
#if SENSOR_SUPPORT == 0
#ifndef WEBUI_MODULE
#define WEBUI_MODULE WEBUI_MODULE_SENSOR
#else
#undef WEBUI_MODULE
#define WEBUI_MODULE WEBUI_MODULE_ALL
#endif
#endif
#if defined(ITEAD_SONOFF_RFBRIDGE)
#ifndef WEBUI_MODULE
#define WEBUI_MODULE WEBUI_MODULE_RFBRIDGE
#else
#undef WEBUI_MODULE
#define WEBUI_MODULE WEBUI_MODULE_ALL
#endif
#endif
#ifndef WEBUI_MODULE
#define WEBUI_MODULE WEBUI_MODULE_SMALL
#endif
#if WEBUI_MODULE == WEBUI_MODULE_SMALL
#include "static/index.small.html.gz.h"
#elif WEBUI_MODULE == WEBUI_MODULE_LIGHT
#include "static/index.light.html.gz.h"
#elif WEBUI_MODULE == WEBUI_MODULE_SENSOR
#include "static/index.sensor.html.gz.h"
#elif WEBUI_MODULE == WEBUI_MODULE_RFBRIDGE
#include "static/index.rfbridge.html.gz.h"
#elif WEBUI_MODULE == WEBUI_MODULE_ALL
#include "static/index.all.html.gz.h"
#endif #endif
#endif // WEB_EMBEDDED #endif // WEB_EMBEDDED


+ 2
- 1
code/gulpfile.js View File

@ -196,7 +196,8 @@ gulp.task('buildfs_inline', function(cb) {
'build_webui_small', 'build_webui_small',
'build_webui_sensor', 'build_webui_sensor',
'build_webui_light', 'build_webui_light',
'build_webui_rfbridge'
'build_webui_rfbridge',
'build_webui_all'
], cb); ], cb);
}); });


Loading…
Cancel
Save