From d26c05c3c1551fa8482db5719ba8d4cde291290a Mon Sep 17 00:00:00 2001 From: dr|z3d Date: Sun, 12 Sep 2021 22:49:00 +0000 Subject: [PATCH] Console: consolidate IPv4/IPv6 network status; null out externalcss if no file --- daemon/HTTPServer.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/daemon/HTTPServer.cpp b/daemon/HTTPServer.cpp index 3113662f..7217879f 100644 --- a/daemon/HTTPServer.cpp +++ b/daemon/HTTPServer.cpp @@ -427,10 +427,12 @@ namespace http { static void GetStyles (std::stringstream& s) { - if (externalCSS.length() != 0) + if (externalCSS.length() != 0) { s << "\r\n"; - else + } else { s << internalCSS; + externalCSS = ""; + } } const char HTTP_PAGE_TUNNEL_SUMMARY[] = "tunnel_summary"; @@ -674,18 +676,16 @@ namespace http { void ShowStatus (std::stringstream& s, bool includeHiddenContent, i2p::http::OutputFormatEnum outputFormat) { - if (i2p::context.SupportsV4 ()) - { - s << "" << tr("Network Status") << ""; + s << "" << tr("Network Status") << ""; + if (i2p::context.SupportsV4 ()) { + s << "" >> tr("IPv4") << ""; ShowNetworkStatus (s, i2p::context.GetStatus ()); - s << "
\r\n"; } - if (i2p::context.SupportsV6 ()) - { - s << "" << tr("Network Status (IPv6)") << ""; + if (i2p::context.SupportsV6 ()) { + s << "" >> tr("IPv6") << ""; ShowNetworkStatus (s, i2p::context.GetStatusV6 ()); - s << "
\r\n"; } + s << "\r\n"; #if ((!defined(WIN32) && !defined(QT_GUI_LIB) && !defined(ANDROID)) || defined(ANDROID_BINARY)) if (auto remains = Daemon.gracefulShutdownInterval) { s << "" << tr("Shutdown") << "";