From 117193fbed6ccff18817f7bf3bc7a273dfd0940a Mon Sep 17 00:00:00 2001 From: andreas Date: Sun, 17 Oct 2021 19:15:22 +0200 Subject: [PATCH] restructure ui, styling --- lib/config/GWConfig.h | 2 - src/main.cpp | 2 + web/index.html | 124 ++++++++++++++++++++++++++++++++---------- 3 files changed, 96 insertions(+), 32 deletions(-) diff --git a/lib/config/GWConfig.h b/lib/config/GWConfig.h index 56d3632..c649863 100644 --- a/lib/config/GWConfig.h +++ b/lib/config/GWConfig.h @@ -21,8 +21,6 @@ class GwConfigItem: public GwConfigInterface{ this->initialValue=initialValue; this->value=initialValue; } - GwConfigItem(const String &name, bool initalValue): - GwConfigItem(name,initalValue?String("true"):String("false")){}; virtual String asString() const{ return value; } diff --git a/src/main.cpp b/src/main.cpp index 677bb36..aedc035 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -207,6 +207,8 @@ void web_setConfig(){ void web_resetConfig(){ config.reset(true); logger.logString("reset config, restart"); + webserver.send(200,F("application/json"),JSON_OK); + delay(100); ESP.restart(); } diff --git a/web/index.html b/web/index.html index eb5641a..7b0ba50 100644 --- a/web/index.html +++ b/web/index.html @@ -5,31 +5,40 @@ NMEA 2000 Gateway @@ -73,6 +122,10 @@ span.label { VERSION --- +
+ connected + +
# CAN messages --- @@ -85,7 +138,15 @@ span.label { wifi client IP ---
-
+ +
+
+ NMEAtoUSB + +
wifiClient
- - - - +
+ + + +
+
+