|
|
@ -1371,7 +1371,7 @@ String AutoConnect::_attachMenuItem(const AC_MENUITEM_t item) { |
|
|
|
PGM_P link; |
|
|
|
PGM_P link; |
|
|
|
PGM_P label; |
|
|
|
PGM_P label; |
|
|
|
|
|
|
|
|
|
|
|
switch (static_cast<AC_MENUITEM_t>(_apConfig.attachMenu & static_cast<uint16_t>(item))) { |
|
|
|
switch (static_cast<AC_MENUITEM_t>(_apConfig.applyMenu & static_cast<uint16_t>(item))) { |
|
|
|
case AC_MENUITEM_CONFIGNEW: |
|
|
|
case AC_MENUITEM_CONFIGNEW: |
|
|
|
id = PSTR(""); |
|
|
|
id = PSTR(""); |
|
|
|
link = PSTR(AUTOCONNECT_URI_CONFIG); |
|
|
|
link = PSTR(AUTOCONNECT_URI_CONFIG); |
|
|
@ -1457,7 +1457,7 @@ PageElement* AutoConnect::_setupPage(String& uri) { |
|
|
|
elm->addToken(String(FPSTR("CHIP_ID")), std::bind(&AutoConnect::_token_CHIP_ID, this, std::placeholders::_1)); |
|
|
|
elm->addToken(String(FPSTR("CHIP_ID")), std::bind(&AutoConnect::_token_CHIP_ID, this, std::placeholders::_1)); |
|
|
|
elm->addToken(String(FPSTR("FREE_HEAP")), std::bind(&AutoConnect::_token_FREE_HEAP, this, std::placeholders::_1)); |
|
|
|
elm->addToken(String(FPSTR("FREE_HEAP")), std::bind(&AutoConnect::_token_FREE_HEAP, this, std::placeholders::_1)); |
|
|
|
} |
|
|
|
} |
|
|
|
else if (uri == String(AUTOCONNECT_URI_CONFIG) && (_apConfig.attachMenu & AC_MENUITEM_CONFIGNEW)) { |
|
|
|
else if (uri == String(AUTOCONNECT_URI_CONFIG) && (_apConfig.applyMenu & AC_MENUITEM_CONFIGNEW)) { |
|
|
|
|
|
|
|
|
|
|
|
// Setup /auto/config
|
|
|
|
// Setup /auto/config
|
|
|
|
elm->setMold(_PAGE_CONFIGNEW); |
|
|
|
elm->setMold(_PAGE_CONFIGNEW); |
|
|
@ -1476,7 +1476,7 @@ PageElement* AutoConnect::_setupPage(String& uri) { |
|
|
|
elm->addToken(String(FPSTR("HIDDEN_COUNT")), std::bind(&AutoConnect::_token_HIDDEN_COUNT, this, std::placeholders::_1)); |
|
|
|
elm->addToken(String(FPSTR("HIDDEN_COUNT")), std::bind(&AutoConnect::_token_HIDDEN_COUNT, this, std::placeholders::_1)); |
|
|
|
elm->addToken(String(FPSTR("CONFIG_IP")), std::bind(&AutoConnect::_token_CONFIG_STAIP, this, std::placeholders::_1)); |
|
|
|
elm->addToken(String(FPSTR("CONFIG_IP")), std::bind(&AutoConnect::_token_CONFIG_STAIP, this, std::placeholders::_1)); |
|
|
|
} |
|
|
|
} |
|
|
|
else if (uri == String(AUTOCONNECT_URI_CONNECT) && (_apConfig.attachMenu & AC_MENUITEM_CONFIGNEW || _apConfig.attachMenu & AC_MENUITEM_OPENSSIDS)) { |
|
|
|
else if (uri == String(AUTOCONNECT_URI_CONNECT) && (_apConfig.applyMenu & AC_MENUITEM_CONFIGNEW || _apConfig.applyMenu & AC_MENUITEM_OPENSSIDS)) { |
|
|
|
|
|
|
|
|
|
|
|
// Setup /auto/connect
|
|
|
|
// Setup /auto/connect
|
|
|
|
_menuTitle = FPSTR(AUTOCONNECT_MENUTEXT_CONNECTING); |
|
|
|
_menuTitle = FPSTR(AUTOCONNECT_MENUTEXT_CONNECTING); |
|
|
@ -1490,7 +1490,7 @@ PageElement* AutoConnect::_setupPage(String& uri) { |
|
|
|
elm->addToken(String(FPSTR("MENU_POST")), std::bind(&AutoConnect::_token_MENU_POST, this, std::placeholders::_1)); |
|
|
|
elm->addToken(String(FPSTR("MENU_POST")), std::bind(&AutoConnect::_token_MENU_POST, this, std::placeholders::_1)); |
|
|
|
elm->addToken(String(FPSTR("CUR_SSID")), std::bind(&AutoConnect::_token_CURRENT_SSID, this, std::placeholders::_1)); |
|
|
|
elm->addToken(String(FPSTR("CUR_SSID")), std::bind(&AutoConnect::_token_CURRENT_SSID, this, std::placeholders::_1)); |
|
|
|
} |
|
|
|
} |
|
|
|
else if (uri == String(AUTOCONNECT_URI_OPEN) && (_apConfig.attachMenu & AC_MENUITEM_OPENSSIDS)) { |
|
|
|
else if (uri == String(AUTOCONNECT_URI_OPEN) && (_apConfig.applyMenu & AC_MENUITEM_OPENSSIDS)) { |
|
|
|
|
|
|
|
|
|
|
|
// Setup /auto/open
|
|
|
|
// Setup /auto/open
|
|
|
|
elm->setMold(_PAGE_OPENCREDT); |
|
|
|
elm->setMold(_PAGE_OPENCREDT); |
|
|
@ -1504,7 +1504,7 @@ PageElement* AutoConnect::_setupPage(String& uri) { |
|
|
|
elm->addToken(String(FPSTR("MENU_POST")), std::bind(&AutoConnect::_token_MENU_POST, this, std::placeholders::_1)); |
|
|
|
elm->addToken(String(FPSTR("MENU_POST")), std::bind(&AutoConnect::_token_MENU_POST, this, std::placeholders::_1)); |
|
|
|
elm->addToken(String(FPSTR("OPEN_SSID")), std::bind(&AutoConnect::_token_OPEN_SSID, this, std::placeholders::_1)); |
|
|
|
elm->addToken(String(FPSTR("OPEN_SSID")), std::bind(&AutoConnect::_token_OPEN_SSID, this, std::placeholders::_1)); |
|
|
|
} |
|
|
|
} |
|
|
|
else if (uri == String(AUTOCONNECT_URI_DISCON) && (_apConfig.attachMenu & AC_MENUITEM_DISCONNECT)) { |
|
|
|
else if (uri == String(AUTOCONNECT_URI_DISCON) && (_apConfig.applyMenu & AC_MENUITEM_DISCONNECT)) { |
|
|
|
|
|
|
|
|
|
|
|
// Setup /auto/disc
|
|
|
|
// Setup /auto/disc
|
|
|
|
_menuTitle = FPSTR(AUTOCONNECT_MENUTEXT_DISCONNECT); |
|
|
|
_menuTitle = FPSTR(AUTOCONNECT_MENUTEXT_DISCONNECT); |
|
|
@ -1516,7 +1516,7 @@ PageElement* AutoConnect::_setupPage(String& uri) { |
|
|
|
elm->addToken(String(FPSTR("MENU_PRE")), std::bind(&AutoConnect::_token_MENU_PRE, this, std::placeholders::_1)); |
|
|
|
elm->addToken(String(FPSTR("MENU_PRE")), std::bind(&AutoConnect::_token_MENU_PRE, this, std::placeholders::_1)); |
|
|
|
elm->addToken(String(FPSTR("MENU_POST")), std::bind(&AutoConnect::_token_MENU_POST, this, std::placeholders::_1)); |
|
|
|
elm->addToken(String(FPSTR("MENU_POST")), std::bind(&AutoConnect::_token_MENU_POST, this, std::placeholders::_1)); |
|
|
|
} |
|
|
|
} |
|
|
|
else if (uri == String(AUTOCONNECT_URI_RESET) && (_apConfig.attachMenu & AC_MENUITEM_RESET)) { |
|
|
|
else if (uri == String(AUTOCONNECT_URI_RESET) && (_apConfig.applyMenu & AC_MENUITEM_RESET)) { |
|
|
|
|
|
|
|
|
|
|
|
// Setup /auto/reset
|
|
|
|
// Setup /auto/reset
|
|
|
|
elm->setMold(_PAGE_RESETTING); |
|
|
|
elm->setMold(_PAGE_RESETTING); |
|
|
|