GUI Show SafeMode instead of Minimal

This commit is contained in:
Theo Arends 2022-05-03 11:19:02 +02:00
parent f24894b25c
commit 1718428f95
1 changed files with 9 additions and 1 deletions

View File

@ -243,7 +243,11 @@ const char HTTP_HEAD_STYLE3[] PROGMEM =
"<body>"
"<div style='text-align:left;display:inline-block;color:#%06x;min-width:340px;'>" // COLOR_TEXT
#ifdef FIRMWARE_MINIMAL
#ifdef FIRMWARE_SAFEMODE
"<div style='text-align:center;color:#%06x;'><h3>SafeMode</h3></div>" // COLOR_TEXT_SUCCESS
#else
"<div style='text-align:center;color:#%06x;'><h3>" D_MINIMAL_FIRMWARE_PLEASE_UPGRADE "</h3></div>" // COLOR_TEXT_WARNING
#endif
#endif
"<div style='text-align:center;color:#%06x;'><noscript>" D_NOSCRIPT "<br></noscript>" // COLOR_TITLE
/*
@ -879,7 +883,11 @@ void WSContentSendStyle_P(const char* formatP, ...) {
}
WSContentSend_P(HTTP_HEAD_STYLE3, WebColor(COL_TEXT),
#ifdef FIRMWARE_MINIMAL
#ifdef FIRMWARE_SAFEMODE
WebColor(COL_TEXT_SUCCESS),
#else
WebColor(COL_TEXT_WARNING),
#endif
#endif
WebColor(COL_TITLE),
(Web.initial_config) ? "" : ModuleName().c_str(), SettingsText(SET_DEVICENAME));
@ -2970,7 +2978,7 @@ void HandleSwitchFactory(void)
const esp_partition_t* partition = esp_ota_get_next_update_partition(nullptr);
esp_ota_set_boot_partition(partition);
}
if (api_mode) {
WSReturnSimpleString("false");
AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_HTTP D_RESTART));