Merge pull request #7329 from ascillato/patch-3

AP MODE: Add Restore Config Button
This commit is contained in:
Theo Arends 2019-12-26 09:20:22 +01:00 committed by GitHub
commit 12ef762162
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 3 deletions

View File

@ -1693,10 +1693,11 @@ void HandleWifiConfiguration(void)
} }
if (WifiIsInManagerMode()) { if (WifiIsInManagerMode()) {
WSContentSpaceButton(BUTTON_RESTART);
#ifndef FIRMWARE_MINIMAL #ifndef FIRMWARE_MINIMAL
WSContentSpaceButton(BUTTON_RESET_CONFIGURATION); WSContentSpaceButton(BUTTON_RESTORE);
WSContentButton(BUTTON_RESET_CONFIGURATION);
#endif // FIRMWARE_MINIMAL #endif // FIRMWARE_MINIMAL
WSContentSpaceButton(BUTTON_RESTART);
} else { } else {
WSContentSpaceButton(BUTTON_CONFIGURATION); WSContentSpaceButton(BUTTON_CONFIGURATION);
} }
@ -1970,7 +1971,11 @@ void HandleRestoreConfiguration(void)
WSContentSendStyle(); WSContentSendStyle();
WSContentSend_P(HTTP_FORM_RST); WSContentSend_P(HTTP_FORM_RST);
WSContentSend_P(HTTP_FORM_RST_UPG, D_RESTORE); WSContentSend_P(HTTP_FORM_RST_UPG, D_RESTORE);
if (WifiIsInManagerMode()) {
WSContentSpaceButton(BUTTON_MAIN);
} else {
WSContentSpaceButton(BUTTON_CONFIGURATION); WSContentSpaceButton(BUTTON_CONFIGURATION);
}
WSContentStop(); WSContentStop();
Web.upload_error = 0; Web.upload_error = 0;