Merge pull request #180 from Hieromon/pr/178

Pr/178
pull/181/head v1.1.4
Hieromon Ikasamo 4 years ago committed by GitHub
commit ebb95cd8e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      README.md
  2. 12
      docs/404.html
  3. 12
      docs/acelements.html
  4. 12
      docs/achandling.html
  5. 12
      docs/acintro.html
  6. 12
      docs/acjson.html
  7. 12
      docs/acupload.html
  8. 12
      docs/advancedusage.html
  9. 12
      docs/api.html
  10. 12
      docs/apiaux.html
  11. 12
      docs/apiconfig.html
  12. 12
      docs/apielements.html
  13. 12
      docs/apiextra.html
  14. 12
      docs/apiupdate.html
  15. 12
      docs/basicusage.html
  16. 1091
      docs/changelabel.html
  17. 35
      docs/changelog.html
  18. 16
      docs/colorized.html
  19. 12
      docs/credit.html
  20. 12
      docs/datatips.html
  21. 16
      docs/faq.html
  22. 12
      docs/gettingstarted.html
  23. 12
      docs/howtoembed.html
  24. BIN
      docs/images/localize.png
  25. BIN
      docs/images/vscode_clean.png
  26. BIN
      docs/images/vscode_statusbar.png
  27. 12
      docs/index.html
  28. 12
      docs/license.html
  29. 12
      docs/lsbegin.html
  30. 12
      docs/menu.html
  31. 12
      docs/menuize.html
  32. 12
      docs/otabrowser.html
  33. 12
      docs/otaserver.html
  34. 12
      docs/otaupdate.html
  35. 2
      docs/search/search_index.json
  36. 63
      docs/sitemap.xml
  37. BIN
      docs/sitemap.xml.gz
  38. 12
      docs/wojson.html
  39. 261
      examples/MyLabels/mylabels.h
  40. 2
      library.json
  41. 2
      library.properties
  42. 1
      mkdocs.yml
  43. 120
      mkdocs/changelabel.md
  44. 4
      mkdocs/changelog.md
  45. BIN
      mkdocs/images/localize.png
  46. BIN
      mkdocs/images/vscode_clean.png
  47. BIN
      mkdocs/images/vscode_statusbar.png
  48. 2
      src/AutoConnect.cpp
  49. 4
      src/AutoConnect.h
  50. 171
      src/AutoConnectLabels.h
  51. 134
      src/AutoConnectPage.cpp

@ -101,6 +101,10 @@ Full documentation is available on https://Hieromon.github.io/AutoConnect, some
## Change log
### [1.1.4] Feb. 14, 2020
- Supports for overriding text of the menu items with user-defined labels.
- Fixed the compiler warning with experimental WiFi mode of ESP8266.
### [1.1.3] Jan. 1, 2020
- Added AUTOCONNECT_NOUSE_JSON directive. (issue #167)
- Removed compiler warning of unused.

@ -674,6 +674,18 @@
</li>
<li class="md-nav__item">
<a href="/AutoConnect/changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

@ -1293,6 +1293,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

@ -887,6 +887,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

@ -758,6 +758,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

@ -942,6 +942,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

@ -791,6 +791,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

@ -908,6 +908,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

@ -867,6 +867,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

@ -854,6 +854,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

@ -938,6 +938,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

@ -1806,6 +1806,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

@ -716,6 +716,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

@ -832,6 +832,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

@ -809,6 +809,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

File diff suppressed because it is too large Load Diff

@ -122,7 +122,7 @@
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" data-md-component="overlay" for="__drawer"></label>
<a href="#113-jan-1-2020" tabindex="1" class="md-skip">
<a href="#114-feb-14-2020" tabindex="1" class="md-skip">
Skip to content
</a>
@ -680,6 +680,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>
@ -725,6 +737,13 @@
<label class="md-nav__title" for="__toc">Table of contents</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="#114-feb-14-2020" class="md-nav__link">
[1.1.4] Feb. 14, 2020
</a>
</li>
<li class="md-nav__item">
<a href="#113-jan-1-2020" class="md-nav__link">
[1.1.3] Jan. 1, 2020
@ -906,6 +925,13 @@
<label class="md-nav__title" for="__toc">Table of contents</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="#114-feb-14-2020" class="md-nav__link">
[1.1.4] Feb. 14, 2020
</a>
</li>
<li class="md-nav__item">
<a href="#113-jan-1-2020" class="md-nav__link">
[1.1.3] Jan. 1, 2020
@ -1065,7 +1091,12 @@
<h1>Change log</h1>
<h4 id="113-jan-1-2020">[1.1.3] Jan. 1, 2020<a class="headerlink" href="#113-jan-1-2020" title="Permanent link">&para;</a></h4>
<h4 id="114-feb-14-2020">[1.1.4] Feb. 14, 2020<a class="headerlink" href="#114-feb-14-2020" title="Permanent link">&para;</a></h4>
<ul>
<li>Supports for overriding text of the menu items with user-defined labels.</li>
<li>Fixed the compiler warning with experimental WiFi mode of ESP8266.</li>
</ul>
<h4 id="113-jan-1-2020">[1.1.3] Jan. 1, 2020<a class="headerlink" href="#113-jan-1-2020" title="Permanent link">&para;</a></h4>
<ul>
<li>Added AUTOCONNECT_NOUSE_JSON directive</li>
<li>Removed compiler warning of unused.</li>

@ -750,6 +750,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>
@ -957,13 +969,13 @@ Defines the active menu item background color.</p>
</a>
<a href="faq.html" title="FAQ" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
<a href="changelabel.html" title="Change label text" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span class="md-footer-nav__direction">
Next
</span>
FAQ
Change label text
</span>
</div>
<div class="md-flex__cell md-flex__cell--shrink">

@ -825,6 +825,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

@ -798,6 +798,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

@ -680,6 +680,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>
@ -1516,7 +1528,7 @@ Also, you can check the memory running out status by rebuilding the sketch with
<div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid">
<a href="colorized.html" title="Custom colorized" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<a href="changelabel.html" title="Change label text" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
</div>
@ -1525,7 +1537,7 @@ Also, you can check the memory running out status by rebuilding the sketch with
<span class="md-footer-nav__direction">
Previous
</span>
Custom colorized
Change label text
</span>
</div>
</a>

@ -748,6 +748,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

@ -811,6 +811,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

@ -820,6 +820,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

@ -676,6 +676,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

@ -716,6 +716,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

@ -770,6 +770,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

@ -730,6 +730,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

@ -736,6 +736,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

@ -777,6 +777,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

@ -716,6 +716,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

File diff suppressed because one or more lines are too long

@ -2,147 +2,152 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://Hieromon.github.io/AutoConnect/index.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/gettingstarted.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/menu.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/basicusage.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/advancedusage.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/acintro.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/acelements.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/acjson.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/achandling.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/otaupdate.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/otabrowser.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/otaserver.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/api.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/apiaux.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/apiconfig.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/apielements.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/apiupdate.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/apiextra.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/howtoembed.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/datatips.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/menuize.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/wojson.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/lsbegin.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/credit.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/acupload.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/colorized.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/changelabel.html</loc>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/faq.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/changelog.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://Hieromon.github.io/AutoConnect/license.html</loc>
<lastmod>2020-01-14</lastmod>
<lastmod>2020-02-15</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>

Binary file not shown.

@ -730,6 +730,18 @@
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>

@ -0,0 +1,261 @@
/**
* The template for the overring the hardcoded strings contained in
* the AutoConnect pages.
* e.g. for PlatformIO, you can add to platformio.ini in your project
* along with AC_LABLES macro which specifies the user-defined label
* constants as follows:
*
* build_flags =
* -DAC_LABELS='"${PROJECT_SRC_DIR}/mylabels.h"'
*
* And places mylabels.h, it needs a structure of the define directive
* provided per label string definition for the change your wants.
*
* #ifdef [ID YOU WANT TO CHANGE]
* #undef [ID YOU WANT TO CHANGE]
* #define [ID YOU WANT TO CHANGE] "NEW_STRING_FOR_THISONE"
* #endif
*
* Details are in the documentation.
* https://hieromon.github.io/AutoConnect/changelabel.html
*/
// Menu item: Configure new AP
//#ifdef AUTOCONNECT_MENULABEL_CONFIGNEW
//#undef AUTOCONNECT_MENULABEL_CONFIGNEW
//#define AUTOCONNECT_MENULABEL_CONFIGNEW "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_MENULABEL_CONFIGNEW
// Menu item: Open SSIDs
//#ifdef AUTOCONNECT_MENULABEL_OPENSSIDS
//#undef AUTOCONNECT_MENULABEL_OPENSSIDS
//#define AUTOCONNECT_MENULABEL_OPENSSIDS "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_MENULABEL_OPENSSIDS
// Menu item: Disconnect
//#ifdef AUTOCONNECT_MENULABEL_DISCONNECT
//#undef AUTOCONNECT_MENULABEL_DISCONNECT
//#define AUTOCONNECT_MENULABEL_DISCONNECT "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_MENULABEL_DISCONNECT
// Menu item: Reset...
//#ifdef AUTOCONNECT_MENULABEL_RESET
//#undef AUTOCONNECT_MENULABEL_RESET
//#define AUTOCONNECT_MENULABEL_RESET "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_MENULABEL_RESET
// Menu item: HOME
//#ifdef AUTOCONNECT_MENULABEL_HOME
//#undef AUTOCONNECT_MENULABEL_HOME
//#define AUTOCONNECT_MENULABEL_HOME "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_MENULABEL_HOME
// Menu item: Update
//#ifdef AUTOCONNECT_MENULABEL_UPDATE
//#undef AUTOCONNECT_MENULABEL_UPDATE
//#define AUTOCONNECT_MENULABEL_UPDATE "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_MENULABEL_UPDATE
// Button label: RESET
//#ifdef AUTOCONNECT_BUTTONLABEL_RESET
//#undef AUTOCONNECT_BUTTONLABEL_RESET
//#define AUTOCONNECT_BUTTONLABEL_RESET "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_BUTTONLABEL_RESET
// Page title: Page not found
//#ifdef AUTOCONNECT_PAGETITLE_NOTFOUND
//#undef AUTOCONNECT_PAGETITLE_NOTFOUND
//#define AUTOCONNECT_PAGETITLE_NOTFOUND "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGETITLE_NOTFOUND
// Page title: AutoConnect resetting
//#ifdef AUTOCONNECT_PAGETITLE_RESETTING
//#undef AUTOCONNECT_PAGETITLE_RESETTING
//#define AUTOCONNECT_PAGETITLE_RESETTING "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGETITLE_RESETTING
// Page title: AutoConnect statistics
//#ifdef AUTOCONNECT_PAGETITLE_STATISTICS
//#undef AUTOCONNECT_PAGETITLE_STATISTICS
//#define AUTOCONNECT_PAGETITLE_STATISTICS "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGETITLE_STATISTICS
// Page statistics row: Established connection
//#ifdef AUTOCONNECT_PAGESTATS_ESTABLISHEDCONNECTION
//#undef AUTOCONNECT_PAGESTATS_ESTABLISHEDCONNECTION
//#define AUTOCONNECT_PAGESTATS_ESTABLISHEDCONNECTION "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGESTATS_ESTABLISHEDCONNECTION
// Page statistics row: Mode
//#ifdef AUTOCONNECT_PAGESTATS_MODE
//#undef AUTOCONNECT_PAGESTATS_MODE
//#define AUTOCONNECT_PAGESTATS_MODE "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGESTATS_MODE
// Page statistics row: IP
//#ifdef AUTOCONNECT_PAGESTATS_IP
//#undef AUTOCONNECT_PAGESTATS_IP
//#define AUTOCONNECT_PAGESTATS_IP "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGESTATS_IP
// Page statistics row: GW
//#ifdef AUTOCONNECT_PAGESTATS_GATEWAY
//#undef AUTOCONNECT_PAGESTATS_GATEWAY
//#define AUTOCONNECT_PAGESTATS_GATEWAY "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGESTATS_GATEWAY
// Page statistics row: Subnet mask
//#ifdef AUTOCONNECT_PAGESTATS_SUBNETMASK
//#undef AUTOCONNECT_PAGESTATS_SUBNETMASK
//#define AUTOCONNECT_PAGESTATS_SUBNETMASK "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGESTATS_SUBNETMASK
// Page statistics row: SoftAP IP
//#ifdef AUTOCONNECT_PAGESTATS_SOFTAPIP
//#undef AUTOCONNECT_PAGESTATS_SOFTAPIP
//#define AUTOCONNECT_PAGESTATS_SOFTAPIP "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGESTATS_SOFTAPIP
// Page statistics row: AP MAC
//#ifdef AUTOCONNECT_PAGESTATS_APMAC
//#undef AUTOCONNECT_PAGESTATS_APMAC
//#define AUTOCONNECT_PAGESTATS_APMAC "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGESTATS_APMAC
// Page statistics row: STA MAC
//#ifdef AUTOCONNECT_PAGESTATS_STAMAC
//#undef AUTOCONNECT_PAGESTATS_STAMAC
//#define AUTOCONNECT_PAGESTATS_STAMAC "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGESTATS_STAMAC
// Page statistics row: Channel
//#ifdef AUTOCONNECT_PAGESTATS_CHANNEL
//#undef AUTOCONNECT_PAGESTATS_CHANNEL
//#define AUTOCONNECT_PAGESTATS_CHANNEL "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGESTATS_CHANNEL
// Page statistics row: dBm
//#ifdef AUTOCONNECT_PAGESTATS_DBM
//#undef AUTOCONNECT_PAGESTATS_DBM
//#define AUTOCONNECT_PAGESTATS_DBM "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGESTATS_DBM
// Page statistics row: Chip ID
//#ifdef AUTOCONNECT_PAGESTATS_CHIPID
//#undef AUTOCONNECT_PAGESTATS_CHIPID
//#define AUTOCONNECT_PAGESTATS_CHIPID "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGESTATS_CHIPID
// Page statistics row: CPU Freq.
//#ifdef AUTOCONNECT_PAGESTATS_CPUFREQ
//#undef AUTOCONNECT_PAGESTATS_CPUFREQ
//#define AUTOCONNECT_PAGESTATS_CPUFREQ "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGESTATS_CPUFREQ
// Page statistics row: Flash size
//#ifdef AUTOCONNECT_PAGESTATS_FLASHSIZE
//#undef AUTOCONNECT_PAGESTATS_FLASHSIZE
//#define AUTOCONNECT_PAGESTATS_FLASHSIZE "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGESTATS_FLASHSIZE
// Page statistics row: Free memory
//#ifdef AUTOCONNECT_PAGESTATS_FREEMEM
//#undef AUTOCONNECT_PAGESTATS_FREEMEM
//#define AUTOCONNECT_PAGESTATS_FREEMEM "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGESTATS_FREEMEM
// Page title: AutoConnect config
//#ifdef AUTOCONNECT_PAGETITLE_CONFIG
//#undef AUTOCONNECT_PAGETITLE_CONFIG
//#define AUTOCONNECT_PAGETITLE_CONFIG "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGETITLE_CONFIG
// Page config text: Total:
//#ifdef AUTOCONNECT_PAGECONFIG_TOTAL
//#undef AUTOCONNECT_PAGECONFIG_TOTAL
//#define AUTOCONNECT_PAGECONFIG_TOTAL "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGECONFIG_TOTAL
// Page config text: Hidden:
//#ifdef AUTOCONNECT_PAGECONFIG_HIDDEN
//#undef AUTOCONNECT_PAGECONFIG_HIDDEN
//#define AUTOCONNECT_PAGECONFIG_HIDDEN "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGECONFIG_HIDDEN
// Page config text: SSID
//#ifdef AUTOCONNECT_PAGECONFIG_SSID
//#undef AUTOCONNECT_PAGECONFIG_SSID
//#define AUTOCONNECT_PAGECONFIG_SSID "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGECONFIG_SSID
// Page config text: Passphrase
//#ifdef AUTOCONNECT_PAGECONFIG_PASSPHRASE
//#undef AUTOCONNECT_PAGECONFIG_PASSPHRASE
//#define AUTOCONNECT_PAGECONFIG_PASSPHRASE "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGECONFIG_PASSPHRASE
// Page config text: Enable DHCP
//#ifdef AUTOCONNECT_PAGECONFIG_ENABLEDHCP
//#undef AUTOCONNECT_PAGECONFIG_ENABLEDHCP
//#define AUTOCONNECT_PAGECONFIG_ENABLEDHCP "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGECONFIG_ENABLEDHCP
// Page config text: Apply
//#ifdef AUTOCONNECT_PAGECONFIG_APPLY
//#undef AUTOCONNECT_PAGECONFIG_APPLY
//#define AUTOCONNECT_PAGECONFIG_APPLY "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGECONFIG_APPLY
// Page title: AutoConnect credentials
//#ifdef AUTOCONNECT_PAGETITLE_CREDENTIALS
//#undef AUTOCONNECT_PAGETITLE_CREDENTIALS
//#define AUTOCONNECT_PAGETITLE_CREDENTIALS "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGETITLE_CREDENTIALS
// Page title: AutoConnect connecting
//#ifdef AUTOCONNECT_PAGETITLE_CONNECTING
//#undef AUTOCONNECT_PAGETITLE_CONNECTING
//#define AUTOCONNECT_PAGETITLE_CONNECTING "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGETITLE_CONNECTING
// Page title: AutoConnect connection failed
//#ifdef AUTOCONNECT_PAGETITLE_CONNECTIONFAILED
//#undef AUTOCONNECT_PAGETITLE_CONNECTIONFAILED
//#define AUTOCONNECT_PAGETITLE_CONNECTIONFAILED "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGETITLE_CONNECTIONFAILED
// Page connection failed: Connection Failed
//#ifdef AUTOCONNECT_PAGECONNECTIONFAILED_CONNECTIONFAILED
//#undef AUTOCONNECT_PAGECONNECTIONFAILED_CONNECTIONFAILED
//#define AUTOCONNECT_PAGECONNECTIONFAILED_CONNECTIONFAILED "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGECONNECTIONFAILED_CONNECTIONFAILED
// Page title: AutoConnect disconnected
//#ifdef AUTOCONNECT_PAGETITLE_DISCONNECTED
//#undef AUTOCONNECT_PAGETITLE_DISCONNECTED
//#define AUTOCONNECT_PAGETITLE_DISCONNECTED "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_PAGETITLE_DISCONNECTED
// Text: No saved credentials.
//#ifdef AUTOCONNECT_TEXT_NOSAVEDCREDENTIALS
//#undef AUTOCONNECT_TEXT_NOSAVEDCREDENTIALS
//#define AUTOCONNECT_TEXT_NOSAVEDCREDENTIALS "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_TEXT_NOSAVEDCREDENTIALS
// Menu Text: Connecting
//#ifdef AUTOCONNECT_MENUTEXT_CONNECTING
//#undef AUTOCONNECT_MENUTEXT_CONNECTING
//#define AUTOCONNECT_MENUTEXT_CONNECTING "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_MENUTEXT_CONNECTING
// Menu Text: Disconnect
//#ifdef AUTOCONNECT_MENUTEXT_DISCONNECT
//#undef AUTOCONNECT_MENUTEXT_DISCONNECT
//#define AUTOCONNECT_MENUTEXT_DISCONNECT "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_MENUTEXT_DISCONNECT
// Menu Text: Failed
//#ifdef AUTOCONNECT_MENUTEXT_FAILED
//#undef AUTOCONNECT_MENUTEXT_FAILED
//#define AUTOCONNECT_MENUTEXT_FAILED "NEW_STRING_YOU_WISH"
//#endif // !AUTOCONNECT_MENUTEXT_FAILED

@ -25,6 +25,6 @@
"espressif8266",
"espressif32"
],
"version": "1.1.3",
"version": "1.1.4",
"license": "MIT"
}

@ -1,5 +1,5 @@
name=AutoConnect
version=1.1.3
version=1.1.4
author=Hieromon Ikasamo <hieromon@gmail.com>
maintainer=Hieromon Ikasamo <hieromon@gmail.com>
sentence=ESP8266/ESP32 WLAN configuration at runtime with web interface.

@ -40,6 +40,7 @@ nav:
- 'Saved credentials access': credit.md
- 'File upload handler': acupload.md
- 'Custom colorized': colorized.md
- 'Change label text': changelabel.md
- 'FAQ' : faq.md
- 'Change log' : changelog.md
- 'License' : license.md

@ -0,0 +1,120 @@
## Change the item's label text
You can change the text of AutoConnect menu items. The easiest way is to rewrite the header file directly in the library that defines the menu label. [Advanced Usage](advancedusage.md#change-the-menu-labels) section describes the detailed how to change the label text directly.
However, this way is less preferred as it modifies the library code and further affects the entire Arduino project you compile. So, here's how to change the label text for each Arduino project without directly modifying the library code. Using this method, you can also display the label text and fixed text on AutoConnect pages in your national language.
(e.g. in Japanese)
<img src="images/localize.png">
### Preparation
AutoConnect needs a definition file as c++ header (.h) to change the label text. It is used when your Arduino project is compiled, and there is no additional memory consumption due to changing the label text. This header file describes each fixed text of AutoConnect with the `#define` preprocessor directive.
The next thing you need is [PlatformIO](https://platformio.org/). [PlatformIO](https://docs.platformio.org/en/latest/what-is-platformio.html#overview) is a very powerful environment for embedded development with multi-platform and multi-architecture build systems. And you can easily set up a PlatformIO for the Arduino development system as follows on your host machine.
- [Microsoft Visual Studio Code](https://platformio.org/install/ide?install=vscode)
- [PlatformIO IDE](https://platformio.org/platformio-ide) (included PlatformIO core)
!!! info "Install PlatformIO and VSCode"
Please refer to [the official documentation](https://docs.platformio.org/en/latest/ide/vscode.html#installation) for PlatformIO and VSCode installation.
The rest of this section assumes that you have a PlatformIO environment with VSCode as the front end that has installed on your host machine.
## How to change the label text
### Label text replacement header file
AutoConnect label texts are pre-assigned with a fixed string so that it can be determined at compile time. Their default definitions are in the [`AutoConnectLabels.h`](https://github.com/Hieromon/AutoConnect/blob/master/src/AutoConnectLabels.h) file that has all the replaceable label text defined by the `#define` directive.
<table>
<tr><th>Label placed</th><th>Pre-defined text</th><th>ID (#define macro)</th></tr>
<tr><td rowspan="6">Menu item</td><td>Configure new AP</td><td>AUTOCONNECT_MENULABEL_CONFIGNEW</td></tr>
<tr><td>Open SSIDs</td><td>AUTOCONNECT_MENULABEL_OPENSSIDS</td></tr>
<tr><td>Disconnect</td><td>AUTOCONNECT_MENULABEL_DISCONNECT</td></tr>
<tr><td>Reset...</td><td>AUTOCONNECT_MENULABEL_RESET</td></tr>
<tr><td>HOME</td><td>AUTOCONNECT_MENULABEL_HOME</td></tr>
<tr><td>Update</td><td>AUTOCONNECT_MENULABEL_UPDATE</td></tr>
<tr><td>Button label</td><td>RESET</td><td>AUTOCONNECT_BUTTONLABEL_RESET</td></tr>
<tr><td rowspan="8">Page title</td><td>Page not found</td><td>AUTOCONNECT_PAGETITLE_NOTFOUND</td></tr>
<tr><td>AutoConnect config</td><td>AUTOCONNECT_PAGETITLE_CONFIG</td></tr>
<tr><td>AutoConnect connecting</td><td>AUTOCONNECT_PAGETITLE_CONNECTING</td></tr>
<tr><td>AutoConnect connection failed</td><td>AUTOCONNECT_PAGETITLE_CONNECTIONFAILED</td></tr>
<tr><td>AutoConnect credentials</td><td>AUTOCONNECT_PAGETITLE_CREDENTIALS</td></tr>
<tr><td>AutoConnect disconnected</td><td>AUTOCONNECT_PAGETITLE_DISCONNECTED</td></tr>
<tr><td>AutoConnect resetting</td><td>AUTOCONNECT_PAGETITLE_RESETTING</td></tr>
<tr><td>AutoConnect statistics</td><td>AUTOCONNECT_PAGETITLE_STATISTICS</td></tr>
<tr><td rowspan="14">Page:[statistics] row</td><td>Established connection</td><td>AUTOCONNECT_PAGESTATS_ESTABLISHEDCONNECTION</td></tr>
<tr><td>Mode</td><td>AUTOCONNECT_PAGESTATS_MODE</td></tr>
<tr><td>IP</td><td>AUTOCONNECT_PAGESTATS_IP</td></tr>
<tr><td>GW</td><td>AUTOCONNECT_PAGESTATS_GATEWAY</td></tr>
<tr><td>Subnet mask</td><td>AUTOCONNECT_PAGESTATS_SUBNETMASK</td></tr>
<tr><td>SoftAP IP</td><td>AUTOCONNECT_PAGESTATS_SOFTAPIP</td></tr>
<tr><td>AP MAC</td><td>AUTOCONNECT_PAGESTATS_APMAC</td></tr>
<tr><td>STA MAC</td><td>AUTOCONNECT_PAGESTATS_STAMAC</td></tr>
<tr><td>Channel</td><td>AUTOCONNECT_PAGESTATS_CHANNEL</td></tr>
<tr><td>dBm</td><td>AUTOCONNECT_PAGESTATS_DBM</td></tr>
<tr><td>Chip ID</td><td>AUTOCONNECT_PAGESTATS_CHIPID</td></tr>
<tr><td>CPU Freq.</td><td>AUTOCONNECT_PAGESTATS_CPUFREQ</td></tr>
<tr><td>Flash size</td><td>AUTOCONNECT_PAGESTATS_FLASHSIZE</td></tr>
<tr><td>Free memory</td><td>AUTOCONNECT_PAGESTATS_FREEMEM</td></tr>
<tr><td rowspan="6">Page:[config] text</td><td>Total:</td><td>AUTOCONNECT_PAGECONFIG_TOTAL</td></tr>
<tr><td>Hidden:</td><td>AUTOCONNECT_PAGECONFIG_HIDDEN</td></tr>
<tr><td>SSID</td><td>AUTOCONNECT_PAGECONFIG_SSID</td></tr>
<tr><td>Passphrase</td><td>AUTOCONNECT_PAGECONFIG_PASSPHRASE</td></tr>
<tr><td>Enable DHCP</td><td>AUTOCONNECT_PAGECONFIG_ENABLEDHCP</td></tr>
<tr><td>Apply</td><td>AUTOCONNECT_PAGECONFIG_APPLY</td></tr>
<tr><td>Page:[connection failed]</td><td>Connection Failed</td><td>AUTOCONNECT_PAGECONNECTIONFAILED_CONNECTIONFAILED</td></tr>
<tr><td>Text</td><td>No saved credentials.</td><td>AUTOCONNECT_TEXT_NOSAVEDCREDENTIALS</td></tr>
<tr><td rowspan="3">Menu Text</td><td>Connecting</td><td>AUTOCONNECT_MENUTEXT_CONNECTING</td></tr>
<tr><td>Disconnect</td><td>AUTOCONNECT_MENUTEXT_DISCONNECT</td></tr>
<tr><td>Failed</td><td>AUTOCONNECT_MENUTEXT_FAILED</td></tr>
</table>
The definition of label text must conform to a certain coding pattern. Undefine with `#undef` the `#define` directive corresponding to the above IDs, and then redefine the ID with the replacement text. And surround it with `#ifdef` ~ `#endif`.
```cpp
#ifdef AUTOCONNECT_MENULABEL_CONFIGNEW
#undef AUTOCONNECT_MENULABEL_CONFIGNEW
#define AUTOCONNECT_MENULABEL_CONFIGNEW "NEW_STRING_YOU_WISH"
#endif
```
You may not need to rewrite all definitions. It depends on your wishes and is sufficient that the above the include file contains only the labels you need.
### Configuration of platformio.ini
You prepare its header file and place it in the `src` folder of the project folder. You can name the file whatever you like, but for the sake of explanation, let's say `mylabels.h`.
When you store `mylabels.h` containing the new label text definition in the `src` folder, your Arduino project folder structure should look like this:
```
<Project folder>
|-- <pio>
|-- <.vscode>
|-- <include>
|-- <lib>
|-- <src>
| |-- main.cpp
| |-- mylabels.h <-- Depends on the project
|-- <test>
|-- .gitignore
|-- .travis.yml
|-- platformio.ini
```
Then, open [`platformio.ini`](https://docs.platformio.org/en/latest/projectconf.html) file and add new [`build_flags`](https://docs.platformio.org/en/latest/projectconf/section_env_build.html#build-flags) for including `mylabels.h` to override the label text.
```ini
build_flags = -DAC_LABELS='"${PROJECT_SRC_DIR}/mylabels.h"'
```
!!! hint "Just change the `mylabels.h`"
Keep `-DAC_LABELS='"${PROJECT_SRC_DIR}/YOUR_FILE_NAME"'` when changing the above `build_flags` item to match your labels header file name.
After placing the `mylabels.h` file and add the `build_flags`, build the project with the replaced label text. You will see the AutoConnect screen with the new text replaced by `mylabels.h`.
!!! caution "Need clean-up before re-build with updated `mylabels.h`"
When you have updated `mylabels.h`, you need deleting compiled library object files before build. Use `Clean` of a PlatformIO task on VSCode status bar.
<p><img src="images/vscode_clean.png"></p>
<p><img src="images/vscode_statusbar.png"></p>

@ -1,3 +1,7 @@
#### [1.1.4] Feb. 14, 2020
- Supports for overriding text of the menu items with user-defined labels.
- Fixed the compiler warning with experimental WiFi mode of ESP8266.
#### [1.1.3] Jan. 1, 2020
- Added AUTOCONNECT_NOUSE_JSON directive
- Removed compiler warning of unused.

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

@ -276,7 +276,7 @@ bool AutoConnect::config(AutoConnectConfig& Config) {
/**
* Configure access point.
* Set up access point with internal AucoConnectConfig parameter corrected
* Set up access point with internal AutoConnectConfig parameter corrected
* by Config method.
*/
bool AutoConnect::_config(void) {

@ -309,7 +309,7 @@ class AutoConnect {
String _redirectURI; /**< Redirect destination */
String _menuTitle; /**< Title string of the page */
/** PegeElements of AutoConnect site. */
/** PageElements of AutoConnect site. */
static const char _CSS_BASE[] PROGMEM;
static const char _CSS_UL[] PROGMEM;
static const char _CSS_ICON_LOCK[] PROGMEM;
@ -377,7 +377,7 @@ class AutoConnect {
String _token_CURRENT_SSID(PageArgument& args);
private:
static const String _emptyString; /**< An empty string alloaction **/
static const String _emptyString; /**< An empty string allocation **/
#if defined(ARDUINO_ARCH_ESP8266)
friend ESP8266WebServer;

@ -2,8 +2,8 @@
* AutoConnect proper menu label constant definition.
* @file AutoConnectLabels.h
* @author hieromon@gmail.com
* @version 1.0.0
* @date 2019-08-15
* @version 1.1.4
* @date 2020-02-13
* @copyright MIT license.
*/
@ -14,7 +14,7 @@
* The upper row of each of the following definition items is the
* default value. The lower row is an alternative label string as
* a sample and can be changed you wish.
*
*
* Notes:
* You can find some tokens for the PageBuilder if you parse
* AutoConnectPage.cpp. Some of the tokens are valid at the time
@ -67,6 +67,171 @@
//#define AUTOCONNECT_BUTTONLABEL_RESET "Reboot"
#endif // !AUTOCONNECT_BUTTONLABEL_RESET
// Page title: Page not found
#ifndef AUTOCONNECT_PAGETITLE_NOTFOUND
#define AUTOCONNECT_PAGETITLE_NOTFOUND "Page not found"
#endif // !AUTOCONNECT_PAGETITLE_NOTFOUND
// Page title: AutoConnect resetting
#ifndef AUTOCONNECT_PAGETITLE_RESETTING
#define AUTOCONNECT_PAGETITLE_RESETTING "AutoConnect resetting"
#endif // !AUTOCONNECT_PAGETITLE_RESETTING
// Page title: AutoConnect statistics
#ifndef AUTOCONNECT_PAGETITLE_STATISTICS
#define AUTOCONNECT_PAGETITLE_STATISTICS "AutoConnect statistics"
#endif // !AUTOCONNECT_PAGETITLE_STATISTICS
// Page statistics row: Established connection
#ifndef AUTOCONNECT_PAGESTATS_ESTABLISHEDCONNECTION
#define AUTOCONNECT_PAGESTATS_ESTABLISHEDCONNECTION "Established connection"
#endif // !AUTOCONNECT_PAGESTATS_ESTABLISHEDCONNECTION
// Page statistics row: Mode
#ifndef AUTOCONNECT_PAGESTATS_MODE
#define AUTOCONNECT_PAGESTATS_MODE "Mode"
#endif // !AUTOCONNECT_PAGESTATS_MODE
// Page statistics row: IP
#ifndef AUTOCONNECT_PAGESTATS_IP
#define AUTOCONNECT_PAGESTATS_IP "IP"
#endif // !AUTOCONNECT_PAGESTATS_IP
// Page statistics row: GW
#ifndef AUTOCONNECT_PAGESTATS_GATEWAY
#define AUTOCONNECT_PAGESTATS_GATEWAY "GW"
#endif // !AUTOCONNECT_PAGESTATS_GATEWAY
// Page statistics row: Subnet mask
#ifndef AUTOCONNECT_PAGESTATS_SUBNETMASK
#define AUTOCONNECT_PAGESTATS_SUBNETMASK "Subnet mask"
#endif // !AUTOCONNECT_PAGESTATS_SUBNETMASK
// Page statistics row: SoftAP IP
#ifndef AUTOCONNECT_PAGESTATS_SOFTAPIP
#define AUTOCONNECT_PAGESTATS_SOFTAPIP "SoftAP IP"
#endif // !AUTOCONNECT_PAGESTATS_SOFTAPIP
// Page statistics row: AP MAC
#ifndef AUTOCONNECT_PAGESTATS_APMAC
#define AUTOCONNECT_PAGESTATS_APMAC "AP MAC"
#endif // !AUTOCONNECT_PAGESTATS_APMAC
// Page statistics row: STA MAC
#ifndef AUTOCONNECT_PAGESTATS_STAMAC
#define AUTOCONNECT_PAGESTATS_STAMAC "STA MAC"
#endif // !AUTOCONNECT_PAGESTATS_STAMAC
// Page statistics row: Channel
#ifndef AUTOCONNECT_PAGESTATS_CHANNEL
#define AUTOCONNECT_PAGESTATS_CHANNEL "Channel"
#endif // !AUTOCONNECT_PAGESTATS_CHANNEL
// Page statistics row: dBm
#ifndef AUTOCONNECT_PAGESTATS_DBM
#define AUTOCONNECT_PAGESTATS_DBM "dBm"
#endif // !AUTOCONNECT_PAGESTATS_DBM
// Page statistics row: Chip ID
#ifndef AUTOCONNECT_PAGESTATS_CHIPID
#define AUTOCONNECT_PAGESTATS_CHIPID "Chip ID"
#endif // !AUTOCONNECT_PAGESTATS_CHIPID
// Page statistics row: CPU Freq.
#ifndef AUTOCONNECT_PAGESTATS_CPUFREQ
#define AUTOCONNECT_PAGESTATS_CPUFREQ "CPU Freq."
#endif // !AUTOCONNECT_PAGESTATS_CPUFREQ
// Page statistics row: Flash size
#ifndef AUTOCONNECT_PAGESTATS_FLASHSIZE
#define AUTOCONNECT_PAGESTATS_FLASHSIZE "Flash size"
#endif // !AUTOCONNECT_PAGESTATS_FLASHSIZE
// Page statistics row: Free memory
#ifndef AUTOCONNECT_PAGESTATS_FREEMEM
#define AUTOCONNECT_PAGESTATS_FREEMEM "Free memory"
#endif // !AUTOCONNECT_PAGESTATS_FREEMEM
// Page title: AutoConnect config
#ifndef AUTOCONNECT_PAGETITLE_CONFIG
#define AUTOCONNECT_PAGETITLE_CONFIG "AutoConnect config"
#endif // !AUTOCONNECT_PAGETITLE_CONFIG
// Page config text: Total:
#ifndef AUTOCONNECT_PAGECONFIG_TOTAL
#define AUTOCONNECT_PAGECONFIG_TOTAL "Total:"
#endif // !AUTOCONNECT_PAGECONFIG_TOTAL
// Page config text: Hidden:
#ifndef AUTOCONNECT_PAGECONFIG_HIDDEN
#define AUTOCONNECT_PAGECONFIG_HIDDEN "Hidden:"
#endif // !AUTOCONNECT_PAGECONFIG_HIDDEN
// Page config text: SSID
#ifndef AUTOCONNECT_PAGECONFIG_SSID
#define AUTOCONNECT_PAGECONFIG_SSID "SSID"
#endif // !AUTOCONNECT_PAGECONFIG_SSID
// Page config text: Passphrase
#ifndef AUTOCONNECT_PAGECONFIG_PASSPHRASE
#define AUTOCONNECT_PAGECONFIG_PASSPHRASE "Passphrase"
#endif // !AUTOCONNECT_PAGECONFIG_PASSPHRASE
// Page config text: Enable DHCP
#ifndef AUTOCONNECT_PAGECONFIG_ENABLEDHCP
#define AUTOCONNECT_PAGECONFIG_ENABLEDHCP "Enable DHCP"
#endif // !AUTOCONNECT_PAGECONFIG_ENABLEDHCP
// Page config text: Apply
#ifndef AUTOCONNECT_PAGECONFIG_APPLY
#define AUTOCONNECT_PAGECONFIG_APPLY "Apply"
#endif // !AUTOCONNECT_PAGECONFIG_APPLY
// Page title: AutoConnect credentials
#ifndef AUTOCONNECT_PAGETITLE_CREDENTIALS
#define AUTOCONNECT_PAGETITLE_CREDENTIALS "AutoConnect credentials"
#endif // !AUTOCONNECT_PAGETITLE_CREDENTIALS
// Page title: AutoConnect connecting
#ifndef AUTOCONNECT_PAGETITLE_CONNECTING
#define AUTOCONNECT_PAGETITLE_CONNECTING "AutoConnect connecting"
#endif // !AUTOCONNECT_PAGETITLE_CONNECTING
// Page title: AutoConnect connection failed
#ifndef AUTOCONNECT_PAGETITLE_CONNECTIONFAILED
#define AUTOCONNECT_PAGETITLE_CONNECTIONFAILED "AutoConnect connection failed"
#endif // !AUTOCONNECT_PAGETITLE_CONNECTIONFAILED
// Page connection failed: Connection Failed
#ifndef AUTOCONNECT_PAGECONNECTIONFAILED_CONNECTIONFAILED
#define AUTOCONNECT_PAGECONNECTIONFAILED_CONNECTIONFAILED "Connection Failed"
#endif // !AUTOCONNECT_PAGECONNECTIONFAILED_CONNECTIONFAILED
// Page title: AutoConnect disconnected
#ifndef AUTOCONNECT_PAGETITLE_DISCONNECTED
#define AUTOCONNECT_PAGETITLE_DISCONNECTED "AutoConnect disconnected"
#endif // !AUTOCONNECT_PAGETITLE_DISCONNECTED
// Text: No saved credentials.
#ifndef AUTOCONNECT_TEXT_NOSAVEDCREDENTIALS
#define AUTOCONNECT_TEXT_NOSAVEDCREDENTIALS "No saved credentials."
#endif // !AUTOCONNECT_TEXT_NOSAVEDCREDENTIALS
// Menu Text: Connecting
#ifndef AUTOCONNECT_MENUTEXT_CONNECTING
#define AUTOCONNECT_MENUTEXT_CONNECTING "Connecting"
#endif // !AUTOCONNECT_MENUTEXT_CONNECTING
// Menu Text: Disconnect
#ifndef AUTOCONNECT_MENUTEXT_DISCONNECT
#define AUTOCONNECT_MENUTEXT_DISCONNECT "Disconnect"
#endif // !AUTOCONNECT_MENUTEXT_DISCONNECT
// Menu Text: Failed
#ifndef AUTOCONNECT_MENUTEXT_FAILED
#define AUTOCONNECT_MENUTEXT_FAILED "Failed"
#endif // !AUTOCONNECT_MENUTEXT_FAILED
// Menu colors
// The following three color code items determine the color scheme of
// the menu. In addition to hexadecimal color values, you can specify

@ -2,8 +2,8 @@
* AutoConnect portal site web page implementation.
* @file AutoConnectPage.h
* @author hieromon@gmail.com
* @version 1.1.3
* @date 2019-11-08
* @version 1.1.4
* @date 2020-02-13
* @copyright MIT license.
*/
@ -19,6 +19,32 @@ extern "C" {
#endif
#include "AutoConnect.h"
#include "AutoConnectPage.h"
/**< Override the hardcoded strings contained in the AutoConnect pages. */
/**< e.g. for PlatformIO, you can add your environment in platformio.ini */
/**< along with AC_LABLES macro which specifies the user-defined label */
/**< constants as follows: */
/**< */
/**< build_flags = */
/**< -DAC_LABELS='"${PROJECT_SRC_DIR}/mylabels.h"' */
/**< */
/**< And places mylabels.h, it needs a structure of the define directive */
/**< provided per label string definition for the change your wants. */
/**< */
/**< #ifdef [ID YOU WANT TO CHANGE] */
/**< #undef [ID YOU WANT TO CHANGE] */
/**< #define [ID YOU WANT TO CHANGE] "NEW_STRING_FOR_THISONE" */
/**< #endif */
/**< */
/**< example:
#ifdef AUTOCONNECT_MENULABEL_CONFIGNEW
#undef AUTOCONNECT_MENULABEL_CONFIGNEW
#define AUTOCONNECT_MENULABEL_CONFIGNEW "NEW_STRING_FOR_THISONE"
#endif
*/
#ifdef AC_LABELS
#include AC_LABELS
#endif
#include "AutoConnectCredential.h"
/**< Basic CSS common to all pages */
@ -550,7 +576,7 @@ const char AutoConnect::_ELM_MENU_POST[] PROGMEM = {
/**< The 404 page content. */
const char AutoConnect::_PAGE_404[] PROGMEM = {
"{{HEAD}}"
"<title>Page not found</title>"
"<title>" AUTOCONNECT_PAGETITLE_NOTFOUND "</title>"
"</head>"
"<body>"
"404 Not found"
@ -562,7 +588,7 @@ const char AutoConnect::_PAGE_404[] PROGMEM = {
const char AutoConnect::_PAGE_RESETTING[] PROGMEM = {
"{{HEAD}}"
"<meta http-equiv=\"refresh\" content=\"{{UPTIME}};url={{BOOTURI}}\">"
"<title>AutoConnect resetting</title>"
"<title>" AUTOCONNECT_PAGETITLE_RESETTING "</title>"
"</head>"
"<body>"
"<h2>{{RESET}}</h2>"
@ -573,7 +599,7 @@ const char AutoConnect::_PAGE_RESETTING[] PROGMEM = {
/**< AutoConnect portal page. */
const char AutoConnect::_PAGE_STAT[] PROGMEM = {
"{{HEAD}}"
"<title>AutoConnect statistics</title>"
"<title>" AUTOCONNECT_PAGETITLE_STATISTICS "</title>"
"<style type=\"text/css\">"
"{{CSS_BASE}}"
"{{CSS_TABLE}}"
@ -589,59 +615,59 @@ const char AutoConnect::_PAGE_STAT[] PROGMEM = {
"<table class=\"info\" style=\"border:none;\">"
"<tbody>"
"<tr>"
"<td>Established connection</td>"
"<td>" AUTOCONNECT_PAGESTATS_ESTABLISHEDCONNECTION "</td>"
"<td>{{ESTAB_SSID}}</td>"
"</tr>"
"<tr>"
"<td>Mode</td>"
"<td>" AUTOCONNECT_PAGESTATS_MODE "</td>"
"<td>{{WIFI_MODE}}({{WIFI_STATUS}})</td>"
"</tr>"
"<tr>"
"<td>IP</td>"
"<td>" AUTOCONNECT_PAGESTATS_IP "</td>"
"<td>{{LOCAL_IP}}</td>"
"</tr>"
"<tr>"
"<td>GW</td>"
"<td>" AUTOCONNECT_PAGESTATS_GATEWAY "</td>"
"<td>{{GATEWAY}}</td>"
"</tr>"
"<tr>"
"<td>Subnet mask</td>"
"<td>" AUTOCONNECT_PAGESTATS_SUBNETMASK "</td>"
"<td>{{NETMASK}}</td>"
"</tr>"
"<tr>"
"<td>SoftAP IP</td>"
"<td>" AUTOCONNECT_PAGESTATS_SOFTAPIP "</td>"
"<td>{{SOFTAP_IP}}</td>"
"</tr>"
"<tr>"
"<td>AP MAC</td>"
"<td>" AUTOCONNECT_PAGESTATS_APMAC "</td>"
"<td>{{AP_MAC}}</td>"
"</tr>"
"<tr>"
"<td>STA MAC</td>"
"<td>" AUTOCONNECT_PAGESTATS_STAMAC "</td>"
"<td>{{STA_MAC}}</td>"
"</tr>"
"<tr>"
"<td>Channel</td>"
"<td>" AUTOCONNECT_PAGESTATS_CHANNEL "</td>"
"<td>{{CHANNEL}}</td>"
"</tr>"
"<tr>"
"<td>dBm</td>"
"<td>" AUTOCONNECT_PAGESTATS_DBM "</td>"
"<td>{{DBM}}</td>"
"</tr>"
"<tr>"
"<td>Chip ID</td>"
"<td>" AUTOCONNECT_PAGESTATS_CHIPID "</td>"
"<td>{{CHIP_ID}}</td>"
"</tr>"
"<tr>"
"<td>CPU Freq.</td>"
"<td>" AUTOCONNECT_PAGESTATS_CPUFREQ "</td>"
"<td>{{CPU_FREQ}}MHz</td>"
"</tr>"
"<tr>"
"<td>Flash size</td>"
"<td>" AUTOCONNECT_PAGESTATS_FLASHSIZE "</td>"
"<td>{{FLASH_SIZE}}</td>"
"</tr>"
"<tr>"
"<td>Free memory</td>"
"<td>" AUTOCONNECT_PAGESTATS_FREEMEM "</td>"
"<td>{{FREE_HEAP}}</td>"
"</tr>"
"</tbody>"
@ -655,7 +681,7 @@ const char AutoConnect::_PAGE_STAT[] PROGMEM = {
/**< A page that specifies the new configuration. */
const char AutoConnect::_PAGE_CONFIGNEW[] PROGMEM = {
"{{HEAD}}"
"<title>AutoConnect config</title>"
"<title>" AUTOCONNECT_PAGETITLE_CONFIG "</title>"
"<style type=\"text/css\">"
"{{CSS_BASE}}"
"{{CSS_ICON_LOCK}}"
@ -674,22 +700,22 @@ const char AutoConnect::_PAGE_CONFIGNEW[] PROGMEM = {
"<form action=\"" AUTOCONNECT_URI_CONNECT "\" method=\"post\">"
"<button style=\"width:0;height:0;padding:0;border:0;margin:0\" aria-hidden=\"true\" tabindex=\"-1\" type=\"submit\" name=\"apply\" value=\"apply\"></button>"
"{{LIST_SSID}}"
"<div style=\"margin:16px 0 8px 0;border-bottom:solid 1px #263238;\">Total:{{SSID_COUNT}} Hidden:{{HIDDEN_COUNT}}</div>"
"<div style=\"margin:16px 0 8px 0;border-bottom:solid 1px #263238;\">" AUTOCONNECT_PAGECONFIG_TOTAL "{{SSID_COUNT}} " AUTOCONNECT_PAGECONFIG_HIDDEN "{{HIDDEN_COUNT}}</div>"
"<ul class=\"noorder\">"
"<li>"
"<label for=\"ssid\">SSID</label>"
"<input id=\"ssid\" type=\"text\" name=\"" AUTOCONNECT_PARAMID_SSID "\" placeholder=\"SSID\">"
"<label for=\"ssid\">" AUTOCONNECT_PAGECONFIG_SSID "</label>"
"<input id=\"ssid\" type=\"text\" name=\"" AUTOCONNECT_PARAMID_SSID "\" placeholder=\"" AUTOCONNECT_PAGECONFIG_SSID "\">"
"</li>"
"<li>"
"<label for=\"passphrase\">Passphrase</label>"
"<input id=\"passphrase\" type=\"password\" name=\"" AUTOCONNECT_PARAMID_PASS "\" placeholder=\"Passphrase\">"
"<label for=\"passphrase\">" AUTOCONNECT_PAGECONFIG_PASSPHRASE "</label>"
"<input id=\"passphrase\" type=\"password\" name=\"" AUTOCONNECT_PARAMID_PASS "\" placeholder=\"" AUTOCONNECT_PAGECONFIG_PASSPHRASE "\">"
"</li>"
"<li>"
"<label for=\"dhcp\">Enable DHCP</label>"
"<label for=\"dhcp\">" AUTOCONNECT_PAGECONFIG_ENABLEDHCP "</label>"
"<input id=\"dhcp\" type=\"checkbox\" name=\"dhcp\" value=\"en\" checked onclick=\"vsw(this.checked);\">"
"</li>"
"{{CONFIG_IP}}"
"<li><input type=\"submit\" name=\"apply\" value=\"Apply\"></li>"
"<li><input type=\"submit\" name=\"apply\" value=\"" AUTOCONNECT_PAGECONFIG_APPLY "\"></li>"
"</ul>"
"</form>"
"</div>"
@ -713,7 +739,7 @@ const char AutoConnect::_PAGE_CONFIGNEW[] PROGMEM = {
/**< A page that reads stored authentication information and starts connection. */
const char AutoConnect::_PAGE_OPENCREDT[] PROGMEM = {
"{{HEAD}}"
"<title>AutoConnect credentials</title>"
"<title>" AUTOCONNECT_PAGETITLE_CREDENTIALS "</title>"
"<style type=\"text/css\">"
"{{CSS_BASE}}"
"{{CSS_ICON_LOCK}}"
@ -740,7 +766,7 @@ const char AutoConnect::_PAGE_OPENCREDT[] PROGMEM = {
const char AutoConnect::_PAGE_CONNECTING[] PROGMEM = {
"{{REQ}}"
"{{HEAD}}"
"<title>AutoConnect connecting</title>"
"<title>" AUTOCONNECT_PAGETITLE_CONNECTING "</title>"
"<style type=\"text/css\">"
"{{CSS_BASE}}"
"{{CSS_SPINNER}}"
@ -768,7 +794,7 @@ const char AutoConnect::_PAGE_CONNECTING[] PROGMEM = {
/**< A page announcing that a connection has been established. */
const char AutoConnect::_PAGE_SUCCESS[] PROGMEM = {
"{{HEAD}}"
"<title>AutoConnect statistics</title>"
"<title>" AUTOCONNECT_PAGETITLE_STATISTICS "</title>"
"<style type=\"text/css\">"
"{{CSS_BASE}}"
"{{CSS_TABLE}}"
@ -784,30 +810,30 @@ const char AutoConnect::_PAGE_SUCCESS[] PROGMEM = {
"<table class=\"info\" style=\"border:none;\">"
"<tbody>"
"<tr>"
"<td>Established connection</td>"
"<td>" AUTOCONNECT_PAGESTATS_ESTABLISHEDCONNECTION "</td>"
"<td>{{ESTAB_SSID}}</td>"
"</tr>"
"<tr>"
"<td>Mode</td>"
"<td>" AUTOCONNECT_PAGESTATS_MODE "</td>"
"<td>{{WIFI_MODE}}({{WIFI_STATUS}})</td>"
"</tr>"
"<tr>"
"<td>IP</td>"
"<td>" AUTOCONNECT_PAGESTATS_IP "</td>"
"<td>{{LOCAL_IP}}</td>"
"</tr>"
"<td>GW</td>"
"<td>" AUTOCONNECT_PAGESTATS_GATEWAY "</td>"
"<td>{{GATEWAY}}</td>"
"</tr>"
"<tr>"
"<td>Subnet mask</td>"
"<td>" AUTOCONNECT_PAGESTATS_SUBNETMASK "</td>"
"<td>{{NETMASK}}</td>"
"</tr>"
"<tr>"
"<td>Channel</td>"
"<td>" AUTOCONNECT_PAGESTATS_CHANNEL "</td>"
"<td>{{CHANNEL}}</td>"
"</tr>"
"<tr>"
"<td>dBm</td>"
"<td>" AUTOCONNECT_PAGESTATS_DBM "</td>"
"<td>{{DBM}}</td>"
"</tr>"
"</tbody>"
@ -821,7 +847,7 @@ const char AutoConnect::_PAGE_SUCCESS[] PROGMEM = {
/**< A response page for connection failed. */
const char AutoConnect::_PAGE_FAIL[] PROGMEM = {
"{{HEAD}}"
"<title>AutoConnect statistics</title>"
"<title>" AUTOCONNECT_PAGETITLE_CONNECTIONFAILED "</title>"
"<style type=\"text/css\">"
"{{CSS_BASE}}"
"{{CSS_TABLE}}"
@ -837,7 +863,7 @@ const char AutoConnect::_PAGE_FAIL[] PROGMEM = {
"<table class=\"info\" style=\"border:none;\">"
"<tbody>"
"<tr>"
"<td>Connection Failed</td>"
"<td>" AUTOCONNECT_PAGECONNECTIONFAILED_CONNECTIONFAILED "</td>"
"<td>{{STATION_STATUS}}</td>"
"</tr>"
"</tbody>"
@ -852,7 +878,7 @@ const char AutoConnect::_PAGE_FAIL[] PROGMEM = {
const char AutoConnect::_PAGE_DISCONN[] PROGMEM = {
"{{DISCONNECT}}"
"{{HEAD}}"
"<title>AutoConnect disconnected</title>"
"<title>" AUTOCONNECT_PAGETITLE_DISCONNECTED "</title>"
"<style type=\"text/css\">"
"{{CSS_BASE}}"
"{{CSS_LUXBAR}}"
@ -977,27 +1003,29 @@ String AutoConnect::_token_ESTAB_SSID(PageArgument& args) {
String AutoConnect::_token_WIFI_MODE(PageArgument& args) {
AC_UNUSED(args);
const char* wifiMode = "";
PGM_P wifiMode;
switch (WiFi.getMode()) {
case WIFI_OFF:
wifiMode = "OFF";
wifiMode = PSTR("OFF");
break;
case WIFI_STA:
wifiMode = "STA";
wifiMode = PSTR("STA");
break;
case WIFI_AP:
wifiMode = "AP";
wifiMode = PSTR("AP");
break;
case WIFI_AP_STA:
wifiMode = "AP_STA";
wifiMode = PSTR("AP_STA");
break;
#ifdef ARDUINO_ARCH_ESP32
case WIFI_MODE_MAX:
wifiMode = "MAX";
wifiMode = PSTR("MAX");
break;
#endif
default:
wifiMode = PSTR("experiment");
}
return String(wifiMode);
return String(FPSTR(wifiMode));
}
String AutoConnect::_token_WIFI_STATUS(PageArgument& args) {
@ -1157,7 +1185,7 @@ String AutoConnect::_token_LIST_SSID(PageArgument& args) {
_scanCount = WiFi.scanNetworks(false, true);
AC_DBG("%d network(s) found\n", (int)_scanCount);
}
// Preapre SSID list content building buffer
// Prepare SSID list content building buffer
size_t bufSize = sizeof('\0') + 192 * (_scanCount > AUTOCONNECT_SSIDPAGEUNIT_LINES ? AUTOCONNECT_SSIDPAGEUNIT_LINES : _scanCount);
bufSize += 88 * (_scanCount > AUTOCONNECT_SSIDPAGEUNIT_LINES ? (_scanCount > (AUTOCONNECT_SSIDPAGEUNIT_LINES * 2) ? 2 : 1) : 0);
char* ssidList = (char*)malloc(bufSize);
@ -1281,7 +1309,7 @@ String AutoConnect::_token_OPEN_SSID(PageArgument& args) {
_scanCount = WiFi.scanNetworks(false, true);
}
else
ssidList = String(F("<p><b>No saved credentials.</b></p>"));
ssidList = String(F("<p><b>" AUTOCONNECT_TEXT_NOSAVEDCREDENTIALS "</b></p>"));
for (uint8_t i = 0; i < creEntries; i++) {
rssiCont[0] = '\0';
@ -1331,7 +1359,7 @@ String AutoConnect::_token_CURRENT_SSID(PageArgument& args) {
/**
* This function dynamically build up the response pages that conform to
* the requested URI. A PageBuilder instance is stored in _rensponsePage
* the requested URI. A PageBuilder instance is stored in _responsePage
* as the response page.
* @param Requested URI.
* @retval true A response page generated.
@ -1394,7 +1422,7 @@ PageElement* AutoConnect::_setupPage(String uri) {
else if (uri == String(AUTOCONNECT_URI_CONNECT)) {
// Setup /auto/connect
_menuTitle = FPSTR("Connecting");
_menuTitle = FPSTR(AUTOCONNECT_MENUTEXT_CONNECTING);
elm->setMold(_PAGE_CONNECTING);
elm->addToken(String(FPSTR("REQ")), std::bind(&AutoConnect::_induceConnect, this, std::placeholders::_1));
elm->addToken(String(FPSTR("HEAD")), std::bind(&AutoConnect::_token_HEAD, this, std::placeholders::_1));
@ -1422,7 +1450,7 @@ PageElement* AutoConnect::_setupPage(String uri) {
else if (uri == String(AUTOCONNECT_URI_DISCON)) {
// Setup /auto/disc
_menuTitle = FPSTR("Disconnect");
_menuTitle = FPSTR(AUTOCONNECT_MENUTEXT_DISCONNECT);
elm->setMold(_PAGE_DISCONN);
elm->addToken(String(FPSTR("DISCONNECT")), std::bind(&AutoConnect::_induceDisconnect, this, std::placeholders::_1));
elm->addToken(String(FPSTR("HEAD")), std::bind(&AutoConnect::_token_HEAD, this, std::placeholders::_1));
@ -1469,7 +1497,7 @@ PageElement* AutoConnect::_setupPage(String uri) {
else if (uri == String(AUTOCONNECT_URI_FAIL)) {
// Setup /auto/fail
_menuTitle = FPSTR("Failed");
_menuTitle = FPSTR(AUTOCONNECT_MENUTEXT_FAILED);
elm->setMold(_PAGE_FAIL);
elm->addToken(String(FPSTR("HEAD")), std::bind(&AutoConnect::_token_HEAD, this, std::placeholders::_1));
elm->addToken(String(FPSTR("CSS_BASE")), std::bind(&AutoConnect::_token_CSS_BASE, this, std::placeholders::_1));

Loading…
Cancel
Save