|
|
@ -1360,22 +1360,41 @@ String AutoConnect::_token_CURRENT_SSID(PageArgument& args) { |
|
|
|
return ssid; |
|
|
|
return ssid; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Generate AutoConnect menu item configured by AutoConnectConfig::attachMenu. |
|
|
|
|
|
|
|
* @param item An enumerated value for the generating item configured in AutoConnectConfig. |
|
|
|
|
|
|
|
* @return HTML string of a li tag with the menu item. |
|
|
|
|
|
|
|
*/ |
|
|
|
String AutoConnect::_attachMenuItem(const AC_MENUITEM_t item) { |
|
|
|
String AutoConnect::_attachMenuItem(const AC_MENUITEM_t item) { |
|
|
|
String liItem = String(F("<li class=\"lb-item\"")); |
|
|
|
AC_MENUITEM_t liItem = static_cast<AC_MENUITEM_t>(_apConfig.attachMenu & static_cast<uint16_t>(item)); |
|
|
|
if (_apConfig.attachMenu & AC_MENUITEM_CONFIGNEW) |
|
|
|
String li = String(F("<li class=\"lb-item\"")); |
|
|
|
liItem += String(F("><a href=\"" AUTOCONNECT_URI_CONFIG "\">" AUTOCONNECT_MENULABEL_CONFIGNEW)); |
|
|
|
if (liItem == AC_MENUITEM_RESET) |
|
|
|
else if (_apConfig.attachMenu & AC_MENUITEM_OPENSSIDS) |
|
|
|
li += String(F(" id=\"reset\"><a href=\"#rdlg\">" AUTOCONNECT_MENULABEL_RESET)); |
|
|
|
liItem += String(F("><a href=\"" AUTOCONNECT_URI_OPEN "\">" AUTOCONNECT_MENULABEL_OPENSSIDS)); |
|
|
|
else { |
|
|
|
else if (_apConfig.attachMenu & AC_MENUITEM_DISCONNECT) |
|
|
|
li += String(F("><a href=\"")); |
|
|
|
liItem += String(F("><a href=\"" AUTOCONNECT_URI_DISCON "\">" AUTOCONNECT_MENULABEL_DISCONNECT)); |
|
|
|
switch (liItem) { |
|
|
|
else if (_apConfig.attachMenu & AC_MENUITEM_RESET) |
|
|
|
case AC_MENUITEM_CONFIGNEW: |
|
|
|
liItem += String(F(" id=\"reset\"><a href=\"#rdlg\">" AUTOCONNECT_MENULABEL_RESET)); |
|
|
|
li += String(F(AUTOCONNECT_URI_CONFIG "\">" AUTOCONNECT_MENULABEL_CONFIGNEW)); |
|
|
|
else if (_apConfig.attachMenu & AC_MENUITEM_HOME) |
|
|
|
break; |
|
|
|
liItem += String(F("><a href=\"HOME_URI\">" AUTOCONNECT_MENULABEL_HOME)); |
|
|
|
case AC_MENUITEM_OPENSSIDS: |
|
|
|
else if (_apConfig.attachMenu & AC_MENUITEM_DEVINFO) |
|
|
|
li += String(F(AUTOCONNECT_URI_OPEN "\">" AUTOCONNECT_MENULABEL_OPENSSIDS)); |
|
|
|
liItem += String(F("><a href=\"" AUTOCONNECT_URI "\">" AUTOCONNECT_MENULABEL_DEVICEINFO)); |
|
|
|
break; |
|
|
|
liItem += String(F("</a></li>")); |
|
|
|
case AC_MENUITEM_DISCONNECT: |
|
|
|
return liItem; |
|
|
|
li += String(F(AUTOCONNECT_URI_DISCON "\">" AUTOCONNECT_MENULABEL_DISCONNECT)); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case AC_MENUITEM_DEVINFO: |
|
|
|
|
|
|
|
li += String(F(AUTOCONNECT_URI "\">" AUTOCONNECT_MENULABEL_DEVICEINFO)); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case AC_MENUITEM_HOME: |
|
|
|
|
|
|
|
li += String(F("HOME_URI\">" AUTOCONNECT_MENULABEL_HOME)); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
li = _emptyString; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
li += String(F("</a></li>")); |
|
|
|
|
|
|
|
return li; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|