From 3dbd49f9b72f2b03673fb1f5299fdddcb4a7d8ce Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Fri, 15 Mar 2019 14:10:42 +0100 Subject: [PATCH] Update GUI template screen Update GUI template screen --- sonoff/xdrv_01_webserver.ino | 18 ++++++++++-------- sonoff/xdrv_07_domoticz.ino | 1 - 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/sonoff/xdrv_01_webserver.ino b/sonoff/xdrv_01_webserver.ino index f243b1b11..d8ab7b56e 100644 --- a/sonoff/xdrv_01_webserver.ino +++ b/sonoff/xdrv_01_webserver.ino @@ -294,9 +294,7 @@ const char HTTP_FORM_LOGIN[] PROGMEM = const char HTTP_FORM_TEMPLATE[] PROGMEM = "
 " D_TEMPLATE_PARAMETERS " " - "
" - "

" D_TEMPLATE_NAME "

" - "

" D_BASE_TYPE "

"; + ""; const char HTTP_FORM_TEMPLATE_FLAG[] PROGMEM = "

" // Keep close so do not use
"
 " D_TEMPLATE_FLAGS " 

" @@ -1063,16 +1061,20 @@ void HandleTemplateConfiguration(void) WSContentSend_P(HTTP_SCRIPT_TEMPLATE); WSContentSendStyle(); WSContentSend_P(HTTP_FORM_TEMPLATE); - - WSContentSend_P(PSTR("
")); + WSContentSend_P(HTTP_TABLE100); + WSContentSend_P(PSTR("" + "" + "
" D_TEMPLATE_NAME "
" D_BASE_TYPE "
" + "


")); + WSContentSend_P(HTTP_TABLE100); for (uint8_t i = 0; i < 17; i++) { if ((i < 6) || ((i > 8) && (i != 11))) { // Ignore flash pins GPIO06, 7, 8 and 11 - WSContentSend_P(PSTR("" D_GPIO "%d%s"), - (0==i)?" style='width:74px'":"", i, ((9==i)||(10==i))? "ESP8285" :"", (0==i)?" style='width:176px'":"", i, i); + bool esp8285 = ((9==i)||(10==i)); + WSContentSend_P(PSTR("%s" D_GPIO "%d%s"), + (esp8285) ? "" : "", i, (esp8285) ? "" : "", (0==i) ? " style='width:200px'" : "", i, i); } } WSContentSend_P(PSTR("")); - WSContentSend_P(HTTP_FORM_TEMPLATE_FLAG); WSContentSend_P(HTTP_FORM_END); WSContentSpaceButton(BUTTON_CONFIGURATION); diff --git a/sonoff/xdrv_07_domoticz.ino b/sonoff/xdrv_07_domoticz.ino index 0bd275d7c..c2020176d 100644 --- a/sonoff/xdrv_07_domoticz.ino +++ b/sonoff/xdrv_07_domoticz.ino @@ -434,7 +434,6 @@ const char HTTP_BTN_MENU_DOMOTICZ[] PROGMEM = const char HTTP_FORM_DOMOTICZ[] PROGMEM = "
 " D_DOMOTICZ_PARAMETERS " " "" - "
" ""; const char HTTP_FORM_DOMOTICZ_RELAY[] PROGMEM = ""
" D_DOMOTICZ_IDX " %d