From 3e8479981de6bd9085e2a46d84cf307fc98addf6 Mon Sep 17 00:00:00 2001 From: eMadman Date: Tue, 7 Nov 2023 22:20:08 -0500 Subject: [PATCH] html updates reformatted wifi list - this should be refactored because I did a lazy solution, creating a table for every line. Added line break for show password fixed text alignment of ssid/password form --- data/HTML_testing_template.html | 49 ++++++++++++++++++++++----------- include/Builtin_Pages.h | 16 +++++------ src/HTTP_Server_Basic.cpp | 3 +- 3 files changed, 43 insertions(+), 25 deletions(-) diff --git a/data/HTML_testing_template.html b/data/HTML_testing_template.html index 8c455c87..6cb26727 100644 --- a/data/HTML_testing_template.html +++ b/data/HTML_testing_template.html @@ -399,7 +399,7 @@ a { color: #000; font-weight: 700; - text-decoration: none + text-decoration: underline } a:hover { @@ -423,29 +423,46 @@

WiFi Setup

-
- NetwalkerLair - -
86%
-
-
+ + + + + + + + +
+ NetwalkerLair + +
86%
+
-
+
Emily
18%
-
+

- - -
- - - + + + + + + + + + +
+ +
+ + + +
+
Show Password


diff --git a/include/Builtin_Pages.h b/include/Builtin_Pages.h index 6d869950..a32d71f7 100644 --- a/include/Builtin_Pages.h +++ b/include/Builtin_Pages.h @@ -18,7 +18,7 @@ const char HTTP_STYLE[] = "label {font-size: medium;}" "div {font-size: medium;}" "a{color: #000000;text-decoration:underline}" - "a:visited {color: #000000;}" + "a:visited {color: #000000;text-decoration:underline}" "h1{color: #03245c;padding: 0.5rem;line-height: 1em;}" "h2{color: #000000;font-size: 1.5rem;font-weight: bold;}" "p{font-size: 1rem;}" @@ -199,7 +199,7 @@ const char HTTP_STYLE[] = "button.D{background-color:#dc3630}" "button:active{opacity:50% !important;cursor:wait;transition-delay: 0s}" // links - "a{color:#000;font-weight:700;text-decoration:none}a:hover{color:#1fa3ec;text-decoration:underline}" + "a{color:#000;font-weight:700;text-decoration:underline}a:hover{color:#1fa3ec;text-decoration:underline}" ""; /* Login page */ @@ -307,16 +307,16 @@ const char* const HTTP_PORTAL_MENU[] = { // const char HTTP_PORTAL_OPTIONS[] = strcat(HTTP_PORTAL_MENU[0] , HTTP_PORTAL_MENU[3] , HTTP_PORTAL_MENU[7]); const char HTTP_PORTAL_OPTIONS[] = ""; -const char HTTP_ITEM_QI[] = ""; // rssi icons -const char HTTP_ITEM_QP[] = "
{r}%
"; // rssi percentage {h} = hidden showperc pref -const char HTTP_ITEM[] = "
{v}{qi}{qp}
"; // {q} = HTTP_ITEM_QI, {r} = HTTP_ITEM_QP +const char HTTP_ITEM_QI[] = ""; // rssi icons +// const char HTTP_ITEM_QP[] = "
{r}%
"; // rssi percentage {h} = hidden showperc pref +const char HTTP_ITEM[] = "
{v}{qi}
"; // {q} = HTTP_ITEM_QI, {r} = HTTP_ITEM_QP // const char HTTP_ITEM[] = "
{v} {R} {r}% {q} {e}
"; // test all tokens const char HTTP_FORM_START[] = ""; const char HTTP_FORM_WIFI[] = - "
Show Password"; + "

Show Password"; const char HTTP_FORM_WIFI_END[] = ""; const char HTTP_FORM_STATIC_HEAD[] = "

"; const char HTTP_FORM_END[] = "

"; diff --git a/src/HTTP_Server_Basic.cpp b/src/HTTP_Server_Basic.cpp index 571fa3ef..884b1574 100644 --- a/src/HTTP_Server_Basic.cpp +++ b/src/HTTP_Server_Basic.cpp @@ -605,11 +605,12 @@ String getScanItemOut() { } } + // token precheck, to speed up replacements on large ap lists String HTTP_ITEM_STR = FPSTR(HTTP_ITEM); // toggle icons with percentage - HTTP_ITEM_STR.replace("{qp}", FPSTR(HTTP_ITEM_QP)); + // HTTP_ITEM_STR.replace("{qp}", FPSTR(HTTP_ITEM_QP)); HTTP_ITEM_STR.replace("{qi}", FPSTR(HTTP_ITEM_QI)); // set token precheck flags