mirror of https://github.com/arendst/Tasmota.git
Fix GUI network information layout
This commit is contained in:
parent
5c73fefbbc
commit
5163f6437e
|
@ -2320,6 +2320,7 @@ void HandleInformation(void)
|
|||
WSContentSend_P(PSTR("}1" D_FRIENDLY_NAME " %d}2%s"), i +1, SettingsText(SET_FRIENDLYNAME1 +i));
|
||||
}
|
||||
WSContentSend_P(PSTR("}1}2 ")); // Empty line
|
||||
bool show_hr = false;
|
||||
if ((WiFi.getMode() >= WIFI_AP) && (static_cast<uint32_t>(WiFi.softAPIP()) != 0)) {
|
||||
WSContentSend_P(PSTR("}1" D_MAC_ADDRESS "}2%s"), WiFi.softAPmacAddress().c_str());
|
||||
WSContentSend_P(PSTR("}1" D_IP_ADDRESS " (AP)}2%_I"), (uint32_t)WiFi.softAPIP());
|
||||
|
@ -2340,8 +2341,9 @@ void HandleInformation(void)
|
|||
WSContentSend_P(PSTR("}1" D_MAC_ADDRESS "}2%s"), WiFi.macAddress().c_str());
|
||||
WSContentSend_P(PSTR("}1" D_IP_ADDRESS " (wifi)}2%_I"), (uint32_t)WiFi.localIP());
|
||||
}
|
||||
show_hr = true;
|
||||
}
|
||||
if (!TasmotaGlobal.global_state.network_down) {
|
||||
if (!TasmotaGlobal.global_state.wifi_down) {
|
||||
WSContentSend_P(PSTR("}1" D_GATEWAY "}2%_I"), Settings->ipv4_address[1]);
|
||||
WSContentSend_P(PSTR("}1" D_SUBNET_MASK "}2%_I"), Settings->ipv4_address[2]);
|
||||
WSContentSend_P(PSTR("}1" D_DNS_SERVER "1}2%_I"), Settings->ipv4_address[3]);
|
||||
|
@ -2349,12 +2351,14 @@ void HandleInformation(void)
|
|||
}
|
||||
#if defined(ESP32) && CONFIG_IDF_TARGET_ESP32 && defined(USE_ETHERNET)
|
||||
if (static_cast<uint32_t>(EthernetLocalIP()) != 0) {
|
||||
WSContentSend_P(PSTR("}1<hr/>}2<hr/>"));
|
||||
if (show_hr) {
|
||||
WSContentSend_P(PSTR("}1<hr/>}2<hr/>"));
|
||||
}
|
||||
WSContentSend_P(PSTR("}1" D_HOSTNAME "}2%s%s"), EthernetHostname(), (Mdns.begun) ? PSTR(".local") : "");
|
||||
WSContentSend_P(PSTR("}1" D_MAC_ADDRESS "}2%s"), EthernetMacAddress().c_str());
|
||||
WSContentSend_P(PSTR("}1" D_IP_ADDRESS " (eth)}2%_I"), (uint32_t)EthernetLocalIP());
|
||||
}
|
||||
if (!TasmotaGlobal.global_state.network_down) {
|
||||
if (!TasmotaGlobal.global_state.eth_down) {
|
||||
WSContentSend_P(PSTR("}1" D_GATEWAY "}2%_I"), Settings->eth_ipv4_address[1]);
|
||||
WSContentSend_P(PSTR("}1" D_SUBNET_MASK "}2%_I"), Settings->eth_ipv4_address[2]);
|
||||
WSContentSend_P(PSTR("}1" D_DNS_SERVER "1}2%_I"), Settings->eth_ipv4_address[3]);
|
||||
|
|
Loading…
Reference in New Issue