From 2951667aff4a535f5288f610589e2712a7f8186e Mon Sep 17 00:00:00 2001 From: dr|z3d Date: Mon, 13 Sep 2021 12:27:09 +0000 Subject: [PATCH] Console: only display netstatus badge for IPv6 --- contrib/webconsole/style.css | 10 +--------- daemon/HTTPServer.cpp | 9 ++------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/contrib/webconsole/style.css b/contrib/webconsole/style.css index fb11c42a..3728d700 100644 --- a/contrib/webconsole/style.css +++ b/contrib/webconsole/style.css @@ -228,19 +228,11 @@ a, .slide label { } #netstatus .badge { - margin: 0 4px; + margin: 0 8px 0 0; padding: 1px 6px; font-weight: 600; } -#netstatus > .badge { - margin-left: 0; -} - -#netstatus > .badge ~ .badge { - margin-left: 8px; -} - label:hover .badge { background: var(--ink); } diff --git a/daemon/HTTPServer.cpp b/daemon/HTTPServer.cpp index 4c61ec84..d73f9f40 100644 --- a/daemon/HTTPServer.cpp +++ b/daemon/HTTPServer.cpp @@ -145,9 +145,7 @@ namespace http { "a,.slide label{text-decoration:none;color:var(--link);font-weight:600}" ".slide label{font-weight:700}" ".badge{margin:0 0 1px 4px;padding:0 10px 2px;display:inline-block;vertical-align:baseline;font-size:85%;border-radius:2px;background:var(--ink-darker);color:var(--page);text-shadow:none}" -"#netstatus .badge{margin:0 4px;padding:1px 6px;font-weight:600}" -"#netstatus > .badge{margin-left:0}" -"#netstatus > .badge ~ .badge{margin-left:8px}" +"#netstatus .badge{margin:0 8px 0 0;padding:1px 6px;font-weight:600}" "label:hover .badge{background:var(--ink)}" "a{padding:1px 8px;display:inline-block;border-radius:2px}" ".listitem a{padding:0 1px}" @@ -680,10 +678,7 @@ namespace http { void ShowStatus (std::stringstream& s, bool includeHiddenContent, i2p::http::OutputFormatEnum outputFormat) { s << "" << tr("Network Status") << ""; - if (i2p::context.SupportsV4 ()) { - s << "" << tr("IPv4") << " "; - ShowNetworkStatus (s, i2p::context.GetStatus ()); - } + ShowNetworkStatus (s, i2p::context.GetStatus ()); if (i2p::context.SupportsV6 ()) { s << "" << tr("IPv6") << " "; ShowNetworkStatus (s, i2p::context.GetStatusV6 ());