Skip to content

Commit 782db9d

Browse files
committed
Updated GUI
1 parent d856cb3 commit 782db9d

16 files changed

+347
-10
lines changed

src/web_server.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ const char _CONTENT_TYPE_JSON[] PROGMEM = "application/json";
5454
const char _CONTENT_TYPE_JS[] PROGMEM = "application/javascript";
5555
const char _CONTENT_TYPE_JPEG[] PROGMEM = "image/jpeg";
5656
const char _CONTENT_TYPE_PNG[] PROGMEM = "image/png";
57+
const char _CONTENT_TYPE_SVG[] PROGMEM = "image/svg+xml";
5758

5859
static const char _DUMMY_PASSWORD[] PROGMEM = "_DUMMY_PASSWORD";
5960
#define DUMMY_PASSWORD FPSTR(_DUMMY_PASSWORD)
@@ -65,6 +66,7 @@ String currentfirmware = ESCAPEQUOTE(BUILD_TAG);
6566

6667
void dumpRequest(MongooseHttpServerRequest *request)
6768
{
69+
#ifdef ENABLE_DEBUG_WEB_REQUEST
6870
DBUGF("host.length = %d", request->host().length());
6971
DBUGF("host.c_str = %p", request->host().c_str());
7072
DBUGF("uri.length = %d", request->uri().length());
@@ -117,6 +119,7 @@ void dumpRequest(MongooseHttpServerRequest *request)
117119
}
118120
}
119121
*/
122+
#endif
120123
}
121124

122125
// -------------------------------------------------------------------

src/web_server.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ extern const char _CONTENT_TYPE_JPEG[];
2525
extern const char _CONTENT_TYPE_PNG[];
2626
#define CONTENT_TYPE_PNG FPSTR(_CONTENT_TYPE_PNG)
2727

28+
extern const char _CONTENT_TYPE_SVG[];
29+
#define CONTENT_TYPE_PNG FPSTR(_CONTENT_TYPE_SVG)
30+
2831
extern MongooseHttpServer server;
2932
extern String currentfirmware;
3033

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
static const char CONTENT_ASSETS_JS[] PROGMEM =
2-
"!function(t){var r={};function o(e){if(r[e])return r[e].exports;var n=r[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=t,o.c=r,o.d=function(e,n,t){o.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},o.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},o.t=function(n,e){if(1&e&&(n=o(n)),8&e)return n;if(4&e&&\"object\"==typeof n&&n&&n.__esModule)return n;var t=Object.create(null);if(o.r(t),Object.defineProperty(t,\"default\",{enumerable:!0,value:n}),2&e&&\"string\"!=typeof n)for(var r in n)o.d(t,r,function(e){return n[e]}.bind(null,r));return t},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,\"a\",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p=\"\",o(o.s=0)}([function(e,n,t){\"use strict\";t.r(n);t(1),t(2),t(3),t(4),t(5)},function(e,n,t){},function(e,n,t){e.exports=t.p+\"emoncms.jpg\"},function(e,n,t){e.exports=t.p+\"favicon-16x16.png\"},function(e,n,t){e.exports=t.p+\"favicon-32x32.png\"},function(e,n,t){e.exports=t.p+\"ohm.jpg\"}]);\n";
2+
"!function(e){var o={};function r(n){if(o[n])return o[n].exports;var t=o[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,r),t.l=!0,t.exports}r.m=e,r.c=o,r.d=function(n,t,e){r.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:e})},r.r=function(n){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(n,\"__esModule\",{value:!0})},r.t=function(t,n){if(1&n&&(t=r(t)),8&n)return t;if(4&n&&\"object\"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(r.r(e),Object.defineProperty(e,\"default\",{enumerable:!0,value:t}),2&n&&\"string\"!=typeof t)for(var o in t)r.d(e,o,function(n){return t[n]}.bind(null,o));return e},r.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(t,\"a\",t),t},r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.p=\"\",r(r.s=0)}([function(n,t,e){\"use strict\";e.r(t);e(1),e(2),e(3),e(4),e(5),e(6),e(7),e(8),e(9),e(10)},function(n,t,e){},function(n,t,e){n.exports=e.p+\"emoncms.jpg\"},function(n,t,e){n.exports=e.p+\"favicon-16x16.png\"},function(n,t,e){n.exports=e.p+\"favicon-32x32.png\"},function(n,t,e){n.exports=e.p+\"ohm.jpg\"},function(n,t,e){n.exports=e.p+\"wifi_signal_1.svg\"},function(n,t,e){n.exports=e.p+\"wifi_signal_2.svg\"},function(n,t,e){n.exports=e.p+\"wifi_signal_3.svg\"},function(n,t,e){n.exports=e.p+\"wifi_signal_4.svg\"},function(n,t,e){n.exports=e.p+\"wifi_signal_5.svg\"}]);\n";

src/web_static/web_server.home.html.h

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

src/web_static/web_server.home.js.h

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/web_static/web_server.lib.js.h

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
static const char CONTENT_STYLE_CSS[] PROGMEM =
2-
"body{font-family:sans-serif;color:#333;font:14px Helvetica,sans-serif;box-sizing:border-box}#page,body{background-color:#fff}#page{margin:20px}iframe{max-width:100%}table{width:100%;border-collapse:collapse}th{background-color:#777;color:#fff;border:1px solid #f1f1f1}td,th{padding:8px}td{background-color:#fff;color:#777;border:1px solid #e1e1e1}tr:nth-child(2n+2){background-color:#f3f3f3}.header{padding:20px}.header h1{padding-bottom:.3em;color:teal;font-size:45px;font-weight:400;text-align:left;margin:0}.header h1,.header h1 span{font-family:Garmond,\"sans-serif\"}.header h1 span{font-weight:700;color:#000}h2{padding-bottom:.2em;border-bottom:1px solid #eee;margin-top:2px}.header h3{padding-top:-5px;padding-left:50px;font-weight:700;font-family:Arial,\"sans-serif\";font-size:17px;color:#b6b6b6;margin:-25px 0 -5px}.box{padding:20px;border:1px solid #ddd;border-radius:1em 1em 1em 1em;box-shadow:1px 7px 7px 1px rgba(0,0,0,.4);background:#fff;margin-bottom:20px}.box-full{margin:20px;width:840px}.box380,.box-half{margin:20px;width:380px}.box380{padding:20px;border:1px solid #ddd;border-radius:1em 1em 1em 1em;box-shadow:1px 7px 7px 1px rgba(0,0,0,.4);background:#fff}.left{float:left;clear:left}.right{float:right;clear:right}@media (max-width:494px){#page{width:inherit;margin:5px auto}#content{padding:1px}.box380,.box-full{margin:8px 8px 12px;padding:10px;width:inherit;float:none}}@media (min-width:494px) and (max-width:980px){#page{width:465px;margin:0 auto}.box-full{width:380px}}@media (min-width:980px){#page{width:930px;margin:0 auto}}button{background-color:teal;border-radius:5px;box-shadow:0 2px 2px 0 rgba(0,0,0,.4);border:none;color:#fff;padding:10px 28px;text-align:center;text-decoration:none;display:inline-block;font-size:1em;margin:4px 2px;cursor:pointer;outline:none}button:disabled{background-color:#eee;color:#ccc}button.on{background-color:#f1f1f1;color:#000}input[type=date],input[type=file],input[type=number],input[type=password],input[type=text],input[type=time],select{box-sizing:border-box;border:1px solid #ddd;border-radius:4px;margin-top:10px;width:280px;padding:5px}input:optional{border-color:#ddd}input:required{border-color:#19a6ff}input:required:valid{border-color:#249c4a}input:required:valid+.validMessage{display:none}input:required+.validMessage{display:block;margin:5px 0}.setup input[type=time],input[type=time]{width:110px}.setup input[type=date]{width:164px}@media screen and (max-width:420px){input[type=file],input[type=number],input[type=password],input[type=text],select{width:240px}input[type=time]{width:85px}input[type=date]{width:174px}}#update{background-color:red}.container{height:inherit;padding-bottom:20px}.tabs{padding-bottom:4px;overflow:hidden}.tabs:after{content:\" \";display:block;height:0;clear:both}.tabs input[type=radio]{display:none}.tabs label{background:teal;border-radius:5px;box-shadow:0 2px 2px 0 rgba(0,0,0,.4);color:#fff;cursor:pointer;display:block;float:left;font-size:1em;height:2.5em;line-height:2.5em;margin-right:.25em;padding:0 1.5em;text-align:center}.tabs input:hover+label{background:#e1e1e1;color:#000}.tabs input:checked+label{background:#f1f1f1;color:#000}#content{background:#e1e1e1;border-radius:.5em .5em .5em .5em;box-shadow:1px 7px 7px 1px rgba(0,0,0,.4);display:block}#content:after{content:\" \";display:block;height:0;clear:both}#footer{font-size:15px;text-align:center;margin-bottom:0}.small-text{font-size:10px;word-wrap:break-word}.saved{border-color:#3c763d!important;border-left-width:5px!important}.warning{border-left-color:#aa6708;border-left-width:5px}.warning h4{color:#aa6708;margin-top:0;margin-bottom:5px}.error{border-left-color:#a94442;border-left-width:5px}.error h4{margin-top:0;margin-bottom:5px}.error h4,.error td{color:#a94442}.error td:first-child{border-left-color:#a94442;border-left-width:5px}.switch{position:relative;display:inline-block;width:40px;height:24px;vertical-align:-40%}.switch input{display:none}.slider{cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc}.slider,.slider:before{position:absolute;-webkit-transition:.4s;transition:.4s}.slider:before{content:\"\";height:16px;width:16px;left:4px;bottom:4px;background-color:#fff}input:checked+.slider{background-color:teal}input:focus+.slider{box-shadow:0 0 1px teal}input:checked+.slider:before{-webkit-transform:translateX(16px);-ms-transform:translateX(16px);transform:translateX(16px)}.slider.round{border-radius:12px}.slider.round:before{border-radius:50%}.info{background-color:teal;border-radius:100%;color:#fff;display:inline-block;font-family:serif;font-size:12px;font-style:italic;height:16px;margin-left:16px;text-align:center;width:16px;vertical-align:20%}.info:before{content:\"i\"}span.selected{color:teal}.ready{border-color:#01c40e;border-left-width:5px;box-shadow:1px 7px 7px 1px rgba(1,196,14,.3)}.connected{border-color:#d5ff70;border-left-width:5px;box-shadow:1px 7px 7px 1px rgba(213,255,112,.4)}.charging{border-color:#0092f7;border-left-width:5px;box-shadow:1px 7px 7px 1px rgba(0,146,247,.4)}.sleeping{border-color:#9200f7;border-left-width:5px;box-shadow:1px 7px 7px 1px rgba(146,0,247,.4)}hr{height:1px;color:#eee;background-color:#eee;border:none}.updateBad{color:red}.updateGood{color:#32c832}.updateSlow{color:#f0b414}.updateSlower{color:#ff7d14}#progressBack{width:100%;border:1px solid #19a6ff;border-radius:4px}#progressBar{width:1%;height:30px;background-color:teal}\n";
2+
"body{font-family:sans-serif;color:#333;font:14px Helvetica,sans-serif;box-sizing:border-box}#page,body{background-color:#fff}#page{margin:20px}iframe{max-width:100%}table{width:100%;border-collapse:collapse}th{background-color:#777;color:#fff;border:1px solid #f1f1f1}td,th{padding:8px}td{color:#777;border:1px solid #e1e1e1}tr{background-color:#fff}tr:nth-child(2n+2){background-color:#f3f3f3}.wifiselected td{background-color:teal;color:#fff}.header{padding:20px}.header h1{padding-bottom:.3em;color:teal;font-size:45px;font-weight:400;text-align:left;margin:0}.header h1,.header h1 span{font-family:Garmond,\"sans-serif\"}.header h1 span{font-weight:700;color:#000}h2{padding-bottom:.2em;border-bottom:1px solid #eee;margin-top:2px}.header h3{padding-top:-5px;padding-left:50px;font-weight:700;font-family:Arial,\"sans-serif\";font-size:17px;color:#b6b6b6;margin:-25px 0 -5px}.box{padding:20px;border:1px solid #ddd;border-radius:1em 1em 1em 1em;box-shadow:1px 7px 7px 1px rgba(0,0,0,.4);background:#fff;margin-bottom:20px}.box-full{margin:20px;width:840px}.box380,.box-half{margin:20px;width:380px}.box380{padding:20px;border:1px solid #ddd;border-radius:1em 1em 1em 1em;box-shadow:1px 7px 7px 1px rgba(0,0,0,.4);background:#fff}.left{float:left;clear:left}.right{float:right;clear:right}@media (max-width:494px){#page{width:inherit;margin:5px auto}#content{padding:1px}.box380,.box-full{margin:8px 8px 12px;padding:10px;width:inherit;float:none}}@media (min-width:494px) and (max-width:980px){#page{width:465px;margin:0 auto}.box-full{width:380px}}@media (min-width:980px){#page{width:930px;margin:0 auto}}button{background-color:teal;border-radius:5px;box-shadow:0 2px 2px 0 rgba(0,0,0,.4);border:none;color:#fff;padding:10px 28px;text-align:center;text-decoration:none;display:inline-block;font-size:1em;margin:4px 2px;cursor:pointer;outline:none}button:disabled{background-color:#eee;color:#ccc}button.on{background-color:#f1f1f1;color:#000}input[type=date],input[type=file],input[type=number],input[type=password],input[type=text],input[type=time],select{box-sizing:border-box;border:1px solid #ddd;border-radius:4px;margin-top:10px;width:280px;padding:5px}input:optional{border-color:#ddd}input:required{border-color:#19a6ff}input:required:valid{border-color:#249c4a}input:required:valid+.validMessage{display:none}input:required+.validMessage{display:block;margin:5px 0}.setup input[type=time],input[type=time]{width:110px}.setup input[type=date]{width:164px}@media screen and (max-width:420px){input[type=file],input[type=number],input[type=password],input[type=text],select{width:240px}input[type=time]{width:85px}input[type=date]{width:174px}}#update{background-color:red}.container{height:inherit;padding-bottom:20px}.tabs{padding-bottom:4px;overflow:hidden}.tabs:after{content:\" \";display:block;height:0;clear:both}.tabs input[type=radio]{display:none}.tabs label{background:teal;border-radius:5px;box-shadow:0 2px 2px 0 rgba(0,0,0,.4);color:#fff;cursor:pointer;display:block;float:left;font-size:1em;height:2.5em;line-height:2.5em;margin-right:.25em;padding:0 1.5em;text-align:center}.tabs input:hover+label{background:#e1e1e1;color:#000}.tabs input:checked+label{background:#f1f1f1;color:#000}#content{background:#e1e1e1;border-radius:.5em .5em .5em .5em;box-shadow:1px 7px 7px 1px rgba(0,0,0,.4);display:block}#content:after{content:\" \";display:block;height:0;clear:both}#footer{font-size:15px;text-align:center;margin-bottom:0}.small-text{font-size:10px;word-wrap:break-word}.saved{border-color:#3c763d!important;border-left-width:5px!important}.warning{border-left-color:#aa6708;border-left-width:5px}.warning h4{color:#aa6708;margin-top:0;margin-bottom:5px}.error{border-left-color:#a94442;border-left-width:5px}.error h4{margin-top:0;margin-bottom:5px}.error h4,.error td{color:#a94442}.error td:first-child{border-left-color:#a94442;border-left-width:5px}.switch{position:relative;display:inline-block;width:40px;height:24px;vertical-align:-40%}.switch input{display:none}.slider{cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc}.slider,.slider:before{position:absolute;-webkit-transition:.4s;transition:.4s}.slider:before{content:\"\";height:16px;width:16px;left:4px;bottom:4px;background-color:#fff}input:checked+.slider{background-color:teal}input:focus+.slider{box-shadow:0 0 1px teal}input:checked+.slider:before{-webkit-transform:translateX(16px);-ms-transform:translateX(16px);transform:translateX(16px)}.slider.round{border-radius:12px}.slider.round:before{border-radius:50%}.info{background-color:teal;border-radius:100%;color:#fff;display:inline-block;font-family:serif;font-size:12px;font-style:italic;height:16px;margin-left:16px;text-align:center;width:16px;vertical-align:20%}.info:before{content:\"i\"}span.selected{color:teal}.ready{border-color:#01c40e;border-left-width:5px;box-shadow:1px 7px 7px 1px rgba(1,196,14,.3)}.connected{border-color:#d5ff70;border-left-width:5px;box-shadow:1px 7px 7px 1px rgba(213,255,112,.4)}.charging{border-color:#0092f7;border-left-width:5px;box-shadow:1px 7px 7px 1px rgba(0,146,247,.4)}.sleeping{border-color:#9200f7;border-left-width:5px;box-shadow:1px 7px 7px 1px rgba(146,0,247,.4)}hr{height:1px;color:#eee;background-color:#eee;border:none}.updateBad{color:red}.updateGood{color:#32c832}.updateSlow{color:#f0b414}.updateSlower{color:#ff7d14}#progressBack{width:100%;border:1px solid #19a6ff;border-radius:4px}#progressBar{width:1%;height:30px;background-color:teal}#wifiList{display:inline-block;width:100%;max-height:230px;overflow:auto}.list-group{display:flex;flex-direction:column;padding-left:0;margin-bottom:0}.list-group-item{position:relative;display:flex;padding:.75rem 1.25rem;margin-bottom:-1px;background-color:#fff;border:1px solid rgba(0,0,0,.125);justify-content:space-between;align-items:center}.list-group-item.active{z-index:2;color:#fff;background-color:teal;border-color:teal}.list-group-item:first-child{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}\n";

0 commit comments

Comments
 (0)