mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-17 08:31:31 +10:00
add customMenuHTML
This commit is contained in:
+17
-3
@@ -1383,6 +1383,10 @@ String WiFiManager::getMenuOut(){
|
||||
|
||||
for(auto menuId :_menuIds ){
|
||||
if((String)_menutokens[menuId] == "param" && _paramsCount == 0) continue; // no params set, omit params from menu, @todo this may be undesired by someone, use only menu to force?
|
||||
if((String)_menutokens[menuId] == "custom" && _customMenuHTML!=NULL){
|
||||
page += _customMenuHTML;
|
||||
continue;
|
||||
}
|
||||
page += HTTP_PORTAL_MENU[menuId];
|
||||
}
|
||||
|
||||
@@ -2733,12 +2737,22 @@ void WiFiManager::setPreOtaUpdateCallback( std::function<void()> func ) {
|
||||
|
||||
/**
|
||||
* set custom head html
|
||||
* custom element will be added to head, eg. new style tag etc.
|
||||
* custom element will be added to head, eg. new meta,style,script tag etc.
|
||||
* @access public
|
||||
* @param char element
|
||||
*/
|
||||
void WiFiManager::setCustomHeadElement(const char* element) {
|
||||
_customHeadElement = element;
|
||||
void WiFiManager::setCustomHeadElement(const char* html) {
|
||||
_customHeadElement = html;
|
||||
}
|
||||
|
||||
/**
|
||||
* set custom menu html
|
||||
* custom element will be added to menu under custom menu item.
|
||||
* @access public
|
||||
* @param char element
|
||||
*/
|
||||
void WiFiManager::setCustomMenuHTML(const char* html) {
|
||||
_customMenuHTML = html;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user