From 0ca4f0a9c6048ad09755edddec3b8f27522fdb52 Mon Sep 17 00:00:00 2001 From: alban Date: Wed, 28 Feb 2024 22:10:06 +0100 Subject: [PATCH] feat: add minifier and update esp32 HTML --- .gitignore | 1 + esp32-timed-switch.ino | 8 ++++---- html/index.html | 23 ++++++++++++++--------- html/minify.sh | 11 +++++++++++ 4 files changed, 30 insertions(+), 13 deletions(-) create mode 100755 html/minify.sh diff --git a/.gitignore b/.gitignore index e621bec..4a87a79 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .vscode .idea venv +*.html diff --git a/esp32-timed-switch.ino b/esp32-timed-switch.ino index 0ea2726..8f69922 100644 --- a/esp32-timed-switch.ino +++ b/esp32-timed-switch.ino @@ -13,7 +13,7 @@ // -------------------------------------------- -const char* html_app="ESP32 timed Switch

Scheduler

"; +const char* html_app="ESP32 timed Switch

Scheduler

"; // PREFERENCES @@ -361,8 +361,8 @@ void loop(){ // GET request if (request.indexOf("GET /api/schedule/") >= 0) { - int startIdIndex = 18; - int endIdIndex = 19; + int startIdIndex = 18; + int endIdIndex = 19; String plug_idStr = request.substring(startIdIndex, endIdIndex); int plug_id = plug_idStr.toInt() - 1; // Adjust for 0 index @@ -410,7 +410,7 @@ void loop(){ } } Serial.println("Done reading. Going for binary."); - + char post_body[24]; client.readBytes(post_body, 24); Serial.print("Read post_body: "); diff --git a/html/index.html b/html/index.html index 004b461..18286c9 100644 --- a/html/index.html +++ b/html/index.html @@ -9,12 +9,14 @@

Scheduler