diff --git a/installer/resources/themes/console/classic/console.css b/installer/resources/themes/console/classic/console.css index e3300ed8198744c78f2494d74ecf426bcd6014f4..bbfd7b5a468380f28aa87839ad3042c0f8800696 100644 --- a/installer/resources/themes/console/classic/console.css +++ b/installer/resources/themes/console/classic/console.css @@ -1751,6 +1751,97 @@ tr:hover th { color: #0c153d; } +/* peers - sort icons */ + +#udpconnections th { + vertical-align: top; + background: #fff; + padding-top: 3px; +} + +#ntcpconnections th { + background: #fff; +} + +#peers > #ntcpcon { + margin-top: 0 !important; +} + +#upnpstatus + #ntcpcon { + margin-top: 10px !important; +} + +.sortup, .sortdown, .sortupactive, .sortdownactive { + padding: 1px 0; + border: 1px solid #999; + border-radius: 2px; + margin: 2px 1px 0; + vertical-align: middle; + text-align: center; + display: inline-block; + width: 16px; + height: 12px; + background-size: 10px auto, 100% 100% !important; +} + +.sortup, .sortdown { + box-shadow: inset 0 0 0 1px #fff, 0 0 1px #ddd;; + opacity: 0.7; +} + +.sortup img, .sortdown img, .sortupactive img, .sortdownactive img { + margin: 0; + padding: 0; + opacity: 0; + width: 16px; + height: 14px; + vertical-align: middle; + text-align: center; +} + +.sortupactive, .sortdownactive { + opacity: 1; + box-shadow: inset 1px 1px 1px #ccc; +} + +.sortup { + background: url(images/sort_up.png) center center no-repeat, linear-gradient(to bottom, #fff, #ddd); +} + +.sortup:hover { + background: url(images/sort_up.png) center center no-repeat, linear-gradient(to bottom, #ddd, #fff); + border: 1px solid #89f; + opacity: 1; +} + +.sortup a:focus, .sortdown a:focus { + background: rgba(255,102,0,0.15); + border-radius: 2px; + box-shadow: inset 0 0 0 1px #fff; + margin-top: -1px; + display: inline-block; +} + +.sortupactive { + background: url(images/sort_up.png) center center no-repeat, #fff; +} + +.sortdown { + background: url(images/sort_down.png) center center no-repeat, linear-gradient(to bottom, #fff, #ddd); +} + +.sortdown:hover { + background: url(images/sort_down.png) center center no-repeat, linear-gradient(to bottom, #ddd, #fff); + border: 1px solid #89f; + opacity: 1; +} + +.sortdownactive { + background: url(images/sort_down.png) center center no-repeat, #fff; +} + +/* end peer sort */ + table#thresholds, table#profile_defs { margin-top: -1px; line-height: 150%; diff --git a/installer/resources/themes/console/classic/images/sort_down.png b/installer/resources/themes/console/classic/images/sort_down.png new file mode 100644 index 0000000000000000000000000000000000000000..42879e6ed7ea928745136174539f2fa5b9814869 Binary files /dev/null and b/installer/resources/themes/console/classic/images/sort_down.png differ diff --git a/installer/resources/themes/console/classic/images/sort_up.png b/installer/resources/themes/console/classic/images/sort_up.png new file mode 100644 index 0000000000000000000000000000000000000000..65a374f68f25068da0f59bb1920748ff00fa3007 Binary files /dev/null and b/installer/resources/themes/console/classic/images/sort_up.png differ diff --git a/installer/resources/themes/console/dark/console.css b/installer/resources/themes/console/dark/console.css index c7029dc933287ff9df8fbb1044e0daa4ba73395b..124d26af83b66292bbe9ea720a5fde39e10fe22a 100644 --- a/installer/resources/themes/console/dark/console.css +++ b/installer/resources/themes/console/dark/console.css @@ -1139,6 +1139,89 @@ td img { padding: 0; } +/* peers - sort icons */ + +#udpconnections th { + vertical-align: top; + padding-top: 3px; +} + +.sortup, .sortdown, .sortupactive, .sortdownactive { + padding: 1px 0; + border: 1px solid #171; + border-radius: 1px; + opacity: 0.7; + margin: 5px 1px 0 !important; + vertical-align: middle; + text-align: center; + display: inline-block; + width: 16px; + height: 12px; + background-size: 10px auto, 100% 100% !important; +} + +.sortup, .sortdown { + box-shadow: inset 0 0 0 1px #000; +} + +.sortup img, .sortdown img, .sortupactive img, .sortdownactive img { + margin: 0; + padding: 0; + opacity: 0; + width: 16px; + height: 14px; + vertical-align: middle; + text-align: center; +} + +.sortup:hover, .sortdown:hover { + opacity: 0.9; + transition: ease all 0.3s; +} + +.sortupactive, .sortdownactive { + opacity: 1; + box-shadow: inset 1px 1px 1px #000; +} + +.sortup { + background: url(images/sort_up.png) center center no-repeat, linear-gradient(to bottom, #040, #000); +} + +.sortup:hover { + background: url(images/sort_up.png) center center no-repeat, linear-gradient(to bottom, #000, #040); + border: 1px solid #f60; +} + +.sortup a:focus, .sortdown a:focus { + background: rgba(255,255,0,0.2); + border-radius: 1px; + margin-top: -1px; + height: 14px; + width: 16px; + display: inline-block; +} + +.sortupactive { + background: url(images/sort_up.png) center center no-repeat, #050; +} + +.sortdown { + background: url(images/sort_down.png) center center no-repeat, linear-gradient(to bottom, #040, #000); +} + +.sortdown:hover { + background: url(images/sort_down.png) center center no-repeat, linear-gradient(to bottom, #000, #040); + border: 1px solid #f60; +} + +.sortdownactive { + background: url(images/sort_down.png) center center no-repeat, #050; + border: 1px solid #050; +} + +/* end peer sort */ + tt { font: bold 9pt "Droid Sans Mono", "Andale Mono", "DejaVu Sans Mono", "Lucida Console", Courier, mono; color: #FF0; diff --git a/installer/resources/themes/console/dark/images/sort_down.png b/installer/resources/themes/console/dark/images/sort_down.png new file mode 100644 index 0000000000000000000000000000000000000000..74250ec7a431e6b1c44a136a45b672146fc27684 Binary files /dev/null and b/installer/resources/themes/console/dark/images/sort_down.png differ diff --git a/installer/resources/themes/console/dark/images/sort_up.png b/installer/resources/themes/console/dark/images/sort_up.png new file mode 100644 index 0000000000000000000000000000000000000000..60cf6c95add71764f8e196675773876d756177d3 Binary files /dev/null and b/installer/resources/themes/console/dark/images/sort_up.png differ diff --git a/installer/resources/themes/console/light/console.css b/installer/resources/themes/console/light/console.css index 1fc77c372e316b1e94b166a4449e7fffb2bd0aa5..768c6af5007ac388bea1bb6a6280118f0b3f9d0b 100644 --- a/installer/resources/themes/console/light/console.css +++ b/installer/resources/themes/console/light/console.css @@ -4530,6 +4530,85 @@ table#profiles tr:hover td, table#floodfills tr:hover td, #ntcpconnections tr:nt color: #111; } +/* peers - sort icons */ + +#udpconnections th { + vertical-align: top; + padding-top: 3px; +} + +.sortup, .sortdown, .sortupactive, .sortdownactive { + padding: 1px 0; + border: 1px solid #999; + border-radius: 2px; + margin: 3px 1px 0 !important; + vertical-align: middle; + text-align: center; + display: inline-block; + width: 16px; + height: 12px; + background-size: 10px auto, 100% 100% !important; +} + +.sortup, .sortdown { + box-shadow: inset 0 0 0 1px #fff, 0 0 1px #ddd; + opacity: 0.75; +} + +.sortup img, .sortdown img, .sortupactive img, .sortdownactive img { + margin: 0; + padding: 0; + opacity: 0; + width: 16px; + height: 14px; + vertical-align: middle; + text-align: center; +} + +.sortupactive, .sortdownactive { + opacity: 1; + box-shadow: inset 1px 1px 1px #ccc; +} + +.sortup { + background: url(images/sort_up.png) center center no-repeat, linear-gradient(to bottom, #fff, #ddd); +} + +.sortup:hover { + background: url(images/sort_up.png) center center no-repeat, linear-gradient(to bottom, #ddd, #fff); + border: 1px solid #f60; + opacity: 1; +} + +.sortup a:focus, .sortdown a:focus { + background: rgba(255,102,0,0.15); + border-radius: 2px; + box-shadow: inset 0 0 0 1px #fff; + margin-top: -1px; + display: inline-block; +} + +.sortupactive { + background: url(images/sort_up.png) center center no-repeat, #fff; +} + +.sortdown { + background: url(images/sort_down.png) center center no-repeat, linear-gradient(to bottom, #fff, #ddd); +} + +.sortdown:hover { + background: url(images/sort_down.png) center center no-repeat, linear-gradient(to bottom, #ddd, #fff); + border: 1px solid #f60; + opacity: 1; +} + +.sortdownactive { + background: url(images/sort_down.png) center center no-repeat, #fff; +} + +/* end peer sort */ + + table#schedjobs { margin-top: -11px !important; } diff --git a/installer/resources/themes/console/light/images/sort_down.png b/installer/resources/themes/console/light/images/sort_down.png new file mode 100644 index 0000000000000000000000000000000000000000..42879e6ed7ea928745136174539f2fa5b9814869 Binary files /dev/null and b/installer/resources/themes/console/light/images/sort_down.png differ diff --git a/installer/resources/themes/console/light/images/sort_up.png b/installer/resources/themes/console/light/images/sort_up.png new file mode 100644 index 0000000000000000000000000000000000000000..65a374f68f25068da0f59bb1920748ff00fa3007 Binary files /dev/null and b/installer/resources/themes/console/light/images/sort_up.png differ diff --git a/installer/resources/themes/console/midnight/console.css b/installer/resources/themes/console/midnight/console.css index 95ca32d10bfb34c7772e22e8ac511453464a6e75..ba1b16323ac707ed42073f9237cb6fa54da5647e 100644 --- a/installer/resources/themes/console/midnight/console.css +++ b/installer/resources/themes/console/midnight/console.css @@ -2688,6 +2688,92 @@ table#ntcpconnections { overflow-x: scroll !important; } +/* peers - sort icons */ + +#ntcpconnections th, #udpconnections th { + background: #000010 !important; +} + +#udpconnections th { + vertical-align: top; + padding-top: 3px; +} + +.sortup, .sortdown, .sortupactive, .sortdownactive { + padding: 1px 0; + border: 1px solid #117; + border: 1px solid #443da0; + border-radius: 1px; + margin: 4px 1px 0 !important; + vertical-align: middle; + text-align: center; + display: inline-block; + width: 16px; + height: 12px; + background-size: 10px auto, 100% 100% !important; +} + +.sortup, .sortdown { + box-shadow: inset 0 0 0 1px #000; + opacity: 0.5; +} + +.sortup img, .sortdown img, .sortupactive img, .sortdownactive img { + margin: 0; + padding: 0; + opacity: 0; + width: 16px; + height: 14px; + vertical-align: middle; + text-align: center; + filter: hue-rotate(60deg); +} + +.sortupactive, .sortdownactive { + opacity: 1; + box-shadow: inset 2px 2px 1px #000; +} + +.sortup { + background: url(images/sort_up.png) center center no-repeat, linear-gradient(to bottom, #004, #000); +} + +.sortup:hover { + background: url(images/sort_up.png) center center no-repeat, linear-gradient(to bottom, #000, #004); + border: 1px solid #652787; + opacity: 1; +} + +.sortup a:focus, .sortdown a:focus { + background: rgba(237, 207, 255, 0.2); + border-radius: 1px; + margin-top: -1px; + height: 14px; + width: 16px; + display: inline-block; +} + +.sortupactive { + background: url(images/sort_up.png) center center no-repeat, #005; +} + +.sortdown { + background: url(images/sort_down.png) center center no-repeat, linear-gradient(to bottom, #004, #000); +} + +.sortdown:hover { + background: url(images/sort_down.png) center center no-repeat, linear-gradient(to bottom, #000, #004); + border: 1px solid #652787; + opacity: 1; +} + +.sortdownactive { + background: url(images/sort_down.png) center center no-repeat, #005; + border: 1px solid #005; +} + +/* end peer sort */ + pre#transports { border: 1px solid #443da0; padding: 15px 7px 5px 15px; diff --git a/installer/resources/themes/console/midnight/images/sort_down.png b/installer/resources/themes/console/midnight/images/sort_down.png new file mode 100644 index 0000000000000000000000000000000000000000..74250ec7a431e6b1c44a136a45b672146fc27684 Binary files /dev/null and b/installer/resources/themes/console/midnight/images/sort_down.png differ diff --git a/installer/resources/themes/console/midnight/images/sort_up.png b/installer/resources/themes/console/midnight/images/sort_up.png new file mode 100644 index 0000000000000000000000000000000000000000..60cf6c95add71764f8e196675773876d756177d3 Binary files /dev/null and b/installer/resources/themes/console/midnight/images/sort_up.png differ diff --git a/router/java/src/net/i2p/router/transport/udp/Sorters.java b/router/java/src/net/i2p/router/transport/udp/Sorters.java index 21ea5ec7aff8b171e8aeb5e26315ffd4ffa314be..ba9d3497f3610bc4916e3ff044173c25ede23473 100644 --- a/router/java/src/net/i2p/router/transport/udp/Sorters.java +++ b/router/java/src/net/i2p/router/transport/udp/Sorters.java @@ -285,20 +285,21 @@ class Sorters { static void appendSortLinks(StringBuilder buf, String urlBase, int sortFlags, String descr, int ascending) { if (ascending == FLAG_ALPHA) { // 0 - buf.append(" <a href=\"").append(urlBase).append("?sort=0" + - "#udpcon\" title=\"").append(descr).append("\"><img src=\"/themes/console/images/inbound.png\" alt=\"V\"></a>"); + buf.append(" <span class=\"sortdown\"><a href=\"").append(urlBase).append("?sort=0" + + "#udpcon\" title=\"").append(descr).append("\"><img src=\"/themes/console/images/inbound.png\" alt=\"V\"></a></span>"); } else if (sortFlags == ascending) { - buf.append(" <a href=\"").append(urlBase).append("?sort=").append(0-ascending); - buf.append("#udpcon\" title=\"").append(descr).append("\"><img src=\"/themes/console/images/inbound.png\" alt=\"V\"></a>" + - "<b><img src=\"/themes/console/images/outbound.png\" alt=\"^\"></b>"); + buf.append(" <span class=\"sortdown\"><a href=\"").append(urlBase).append("?sort=").append(0-ascending); + buf.append("#udpcon\" title=\"").append(descr).append("\"><img src=\"/themes/console/images/inbound.png\" alt=\"V\"></a></span>" + + "<span class=\"sortupactive\"><b><img src=\"/themes/console/images/outbound.png\" alt=\"^\"></b></span>"); } else if (sortFlags == 0 - ascending) { - buf.append(" <b><img src=\"/themes/console/images/inbound.png\" alt=\"V\"></b><a href=\"").append(urlBase).append("?sort=").append(ascending); - buf.append("#udpcon\" title=\"").append(descr).append("\"><img src=\"/themes/console/images/outbound.png\" alt=\"^\"></a>"); + buf.append(" <span class=\"sortdownactive\"><b><img src=\"/themes/console/images/inbound.png\" alt=\"V\"></b></span><span class=\"sortup\"><a href=\"") + .append(urlBase).append("?sort=").append(ascending); + buf.append("#udpcon\" title=\"").append(descr).append("\"><img src=\"/themes/console/images/outbound.png\" alt=\"^\"></a></span>"); } else { - buf.append(" <a href=\"").append(urlBase).append("?sort=").append(0-ascending); - buf.append("#udpcon\" title=\"").append(descr).append("\"><img src=\"/themes/console/images/inbound.png\" alt=\"V\"></a>" + - "<a href=\"").append(urlBase).append("?sort=").append(ascending); - buf.append("#udpcon\" title=\"").append(descr).append("\"><img src=\"/themes/console/images/outbound.png\" alt=\"^\"></a>"); + buf.append(" <span class=\"sortdown\"><a href=\"").append(urlBase).append("?sort=").append(0-ascending); + buf.append("#udpcon\" title=\"").append(descr).append("\"><img src=\"/themes/console/images/inbound.png\" alt=\"V\"></a></span>" + + "<span class=\"sortup\"><a href=\"").append(urlBase).append("?sort=").append(ascending); + buf.append("#udpcon\" title=\"").append(descr).append("\"><img src=\"/themes/console/images/outbound.png\" alt=\"^\"></a></span>"); } } }