diff --git a/apps/i2ptunnel/jsp/edit.jsp b/apps/i2ptunnel/jsp/edit.jsp index 3b341cc3c0..415713b503 100644 --- a/apps/i2ptunnel/jsp/edit.jsp +++ b/apps/i2ptunnel/jsp/edit.jsp @@ -72,5 +72,6 @@ if (__invalid) { } // isInitialized() } %> + diff --git a/apps/i2ptunnel/jsp/editClient.jsi b/apps/i2ptunnel/jsp/editClient.jsi index 23c3849d5b..5323d3111a 100644 --- a/apps/i2ptunnel/jsp/editClient.jsi +++ b/apps/i2ptunnel/jsp/editClient.jsi @@ -251,8 +251,8 @@ -
- <%=intl._t("Tunnel Options")%> + + <%=intl._t("Tunnel Length Options")%>
@@ -297,6 +297,10 @@
+ +
+ <%=intl._t("Tunnel Quantity Options")%> +
<%=intl._t("Count")%> @@ -325,6 +329,11 @@
+ + + <% if ("client".equals(tunnelType)) { %> @@ -348,27 +357,8 @@ <% } // client - - if (!editBean.isRouterContext()) { %> -
+ <%=intl._t("Tunnel Time-Management Options")%> +
- - - - - - <% - } // !isRouterContext - if (!"streamrclient".equals(tunnelType)) { // streamr client sends pings so it will never be idle %> @@ -472,8 +462,13 @@ if ("httpclient".equals(tunnelType)) { %> +
- <%=intl._t("Router I2CP Address")%> -
- <%=intl._t("Host")%>: - " value="<%=editBean.getI2CPHost(curTunnel)%>" class="freetext host" /> - - <%=intl._t("Port")%>: - " value="<%=editBean.getI2CPPort(curTunnel)%>" class="freetext port" /> -
+ + @@ -494,15 +489,19 @@ <%=intl._t("Allow SSL to I2P addresses")%> -
+ <%=intl._t("Tunnel Filtering Options")%> +
<%=intl._t("HTTP Filtering")%>
- <% } // if httpclient int currentSigType = editBean.getSigType(curTunnel, tunnelType); String disabled = editBean.canChangeSigType(curTunnel) ? "" : " disabled=\"disabled\" "; %> +
+ + + @@ -567,8 +566,13 @@ <% if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) { %> +
+ <%=intl._t("Tunnel Cryptography Options")%> +
<%=intl._t("Signature type")%>
+ + @@ -606,14 +610,18 @@ " value="<%=editBean.getOutproxyPassword(curTunnel)%>" class="freetext password" /> -
+ <%=intl._t("Tunnel Authentication Options")%> +
<%=intl._t("Local Authorization")%>
<% } // httpclient || connect || socks || socksirc if ("httpclient".equals(tunnelType)) { %> + + + @@ -622,13 +630,34 @@ -
+ <%=intl._t("Tunnel Address-Service Options")%> +
<%=intl._t("Jump URL List")%>
<% } // httpclient +%> + +<% + if (!editBean.isRouterContext()) { +%> + + + + + + +
+ <%=intl._t("Router I2CP Address")%> +
+ <%=intl._t("Host")%>: + " value="<%=editBean.getI2CPHost(curTunnel)%>" class="freetext host" /> + + <%=intl._t("Port")%>: + " value="<%=editBean.getI2CPPort(curTunnel)%>" class="freetext port" /> +
+<% + } // !isRouterContext %> - diff --git a/apps/i2ptunnel/jsp/editServer.jsi b/apps/i2ptunnel/jsp/editServer.jsi index f3b3b65add..10705ca7b1 100644 --- a/apps/i2ptunnel/jsp/editServer.jsi +++ b/apps/i2ptunnel/jsp/editServer.jsi @@ -237,13 +237,12 @@

<%=intl._t("Advanced networking options")%>

-
+ <%=intl._t("Custom options")%>
+
- - <% if (editBean.isAdvanced()) { %> - - - - -<% if (editBean.isAdvanced()) { + <% if (editBean.isAdvanced()) { // repeat four options above for outbound %> +
- <%=intl._t("Tunnel Options")%> + + <%=intl._t("Tunnel Length Options")%>
@@ -286,44 +285,11 @@ <% if (tunnelVariance > 2 || tunnelVariance < -2) { %> -<% } - %> - -
- <%=intl._t("Count")%> - - <%=intl._t("Backup Count")%> -
- - -
@@ -361,6 +327,56 @@ <% } %> +
+ + + + + + + + + + + + + + <% } // isAdvanced() End outbound config section - - if (!"streamrserver".equals(tunnelType)) { %> - - - - - <% - } /* !streamrserver */ - - if (!editBean.isRouterContext()) { -%> - - - - - -<% - } // !isRouterContext - // TODO, encrypted + offline is unimplemented if (!editBean.getIsOfflineKeys(curTunnel)) { %> +
+ <%=intl._t("Tunnel Quantity Options")%> +
+ <%=intl._t("Inbound")%> +
+ <%=intl._t("Count")%> + + <%=intl._t("Backup Count")%> +
+ + + +
+ <%=intl._t("Outbound")%> +
<%=intl._t("Count")%> @@ -388,47 +404,18 @@
- <%=intl._t("Profile")%> -
- -
- <%=intl._t("Router I2CP Address")%> -
- <%=intl._t("Host")%>: - " value="<%=editBean.getI2CPHost(curTunnel)%>" class="freetext" /> - - <%=intl._t("Port")%>: - " value="<%=editBean.getI2CPPort(curTunnel)%>" class="freetext" /> -
+ + + @@ -577,184 +564,6 @@ } // allowBlinding } // !isOffline %> - - - - - - - - - - - - - - - - - -<% - if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { -%> - - - - - -<% } // httpserver -%> - - - - - - - - - - - - - - - <% /***************** %>
+ <%=intl._t("Tunnel Cryptography Options")%> +
<%=intl._t("Encrypt Leaseset")%>
- <%=intl._t("Restricted Access List")%> -
- - - -
- <%=intl._t("Access List Description")%> (<%=intl._t("Specify clients, 1 per line")%>) -
- -
- <%=intl._t("Filter Definition File")%> -
- <%=intl._t("You can define an advanced filter for this tunnel.")%> (<%=intl._t("Format Specification")%>) -
- - -
- <%=intl._t("Server Access Options")%> -
- - - -
- - - " value="<%=editBean.getUserAgents(curTunnel)%>" class="freetext" /> -
- - - -
- <%=intl._t("Server Throttling")%> -
- - - - - - - - - - - - - - - - - - - - -<% - if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { -%> - - - - - - - - - - - -<% } // httpserver -%> - -
- <%=intl._t("Inbound connection limits (0=unlimited)")%> -
<%=intl._t("Per Minute")%><%=intl._t("Per Hour")%><%=intl._t("Per Day")%>
<%=intl._t("Per Client")%> - " value="<%=editBean.getLimitMinute(curTunnel)%>" class="freetext" /> - - " value="<%=editBean.getLimitHour(curTunnel)%>" class="freetext" /> - - " value="<%=editBean.getLimitDay(curTunnel)%>" class="freetext" /> -
<%=intl._t("Total")%> - " value="<%=editBean.getTotalMinute(curTunnel)%>" class="freetext" /> - - " value="<%=editBean.getTotalHour(curTunnel)%>" class="freetext" /> - - " value="<%=editBean.getTotalDay(curTunnel)%>" class="freetext" /> -
<%=intl._t("Max concurrent connections (0=unlimited)")%>
- " value="<%=editBean.getMaxStreams(curTunnel)%>" class="freetext" /> -
- <%=intl._t("POST limits (0=unlimited)")%> -
- <%=intl._t("Per Period")%> - - <%=intl._t("Ban Duration")%> -
- <%=intl._t("Per Client")%> - - - " value="<%=editBean.getPostMax(curTunnel)%>" class="freetext quantity"/> - - " value="<%=editBean.getPostBanTime(curTunnel)%>" class="freetext period"/> - <%=intl._t("minutes")%> -
- <%=intl._t("Total")%> - - - " value="<%=editBean.getPostTotalMax(curTunnel)%>" class="freetext quantity"/> - - " value="<%=editBean.getPostTotalBanTime(curTunnel)%>" class="freetext period"/> - <%=intl._t("minutes")%> -
- <%=intl._t("POST limit period")%> - - - " value="<%=editBean.getPostCheckTime(curTunnel)%>" class="freetext period"/> - <%=intl._t("minutes")%> -
-
- <%=intl._t("Reduce tunnel quantity when idle")%> -
- -
- <%=intl._t("Reduced tunnel count")%>: - " value="<%=editBean.getReduceCount(curTunnel)%>" class="freetext quantity" /> - - <%=intl._t("Idle period")%>: - " value="<%=editBean.getReduceTime(curTunnel)%>" class="freetext period" /> - <%=intl._t("minutes")%> -
@@ -925,6 +734,239 @@ } // ab64 } // currentSigType %> +
+ + + + + + + + + + + + + + + + + + + + + <% + if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { +%> + + + + + +<% } // httpserver +%> + + + +
+ <%=intl._t("Tunnel Access Control Options")%> +
+ <%=intl._t("Restricted Access List")%> +
+ + + +
+ <%=intl._t("Access List Description")%> (<%=intl._t("Specify clients, 1 per line")%>) +
+ +
+ <%=intl._t("Filter Definition File")%> +
+ <%=intl._t("You can define an advanced filter for this tunnel.")%> (<%=intl._t("Format Specification")%>) +
+ + +
+ <%=intl._t("Server Access Options")%> +
+ + + +
+ + + " value="<%=editBean.getUserAgents(curTunnel)%>" class="freetext" /> +
+ + + +
+ + + + +<% + if (!"streamrserver".equals(tunnelType)) { +%> + + + + + +<% + } /* !streamrserver */ +%> + + + + + + + + + +<% + if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) { +%> + + + + + + + + + + + + + + + +<% } // httpserver +%> +<% + if (!editBean.isRouterContext()) { +%> +
+ <%=intl._t("Tunnel Performance Options")%> +
+ <%=intl._t("Profile")%> +
+ +
+ <%=intl._t("Reduce tunnel quantity when idle")%> +
+ +
+ <%=intl._t("Reduced tunnel count")%>: + " value="<%=editBean.getReduceCount(curTunnel)%>" class="freetext quantity" /> + + <%=intl._t("Idle period")%>: + " value="<%=editBean.getReduceTime(curTunnel)%>" class="freetext period" /> + <%=intl._t("minutes")%> +
+ <%=intl._t("Server Throttling")%> +
+ + + + + + + + + + + + + + + + + + + + +
+ <%=intl._t("Inbound connection limits (0=unlimited)")%> +
<%=intl._t("Per Minute")%><%=intl._t("Per Hour")%><%=intl._t("Per Day")%>
<%=intl._t("Per Client")%> + " value="<%=editBean.getLimitMinute(curTunnel)%>" class="freetext" /> + + " value="<%=editBean.getLimitHour(curTunnel)%>" class="freetext" /> + + " value="<%=editBean.getLimitDay(curTunnel)%>" class="freetext" /> +
<%=intl._t("Total")%> + " value="<%=editBean.getTotalMinute(curTunnel)%>" class="freetext" /> + + " value="<%=editBean.getTotalHour(curTunnel)%>" class="freetext" /> + + " value="<%=editBean.getTotalDay(curTunnel)%>" class="freetext" /> +
<%=intl._t("Max concurrent connections (0=unlimited)")%>
+ " value="<%=editBean.getMaxStreams(curTunnel)%>" class="freetext" /> +
+
+ <%=intl._t("POST limits (0=unlimited)")%> +
+ <%=intl._t("Per Period")%> + + <%=intl._t("Ban Duration")%> +
+ <%=intl._t("Per Client")%> + + + " value="<%=editBean.getPostMax(curTunnel)%>" class="freetext quantity"/> + + " value="<%=editBean.getPostBanTime(curTunnel)%>" class="freetext period"/> + <%=intl._t("minutes")%> +
+ <%=intl._t("Total")%> + + + " value="<%=editBean.getPostTotalMax(curTunnel)%>" class="freetext quantity"/> + + " value="<%=editBean.getPostTotalBanTime(curTunnel)%>" class="freetext period"/> + <%=intl._t("minutes")%> +
+ <%=intl._t("POST limit period")%> + + + " value="<%=editBean.getPostCheckTime(curTunnel)%>" class="freetext period"/> + <%=intl._t("minutes")%> +
+ + + + + + +<% + } // !isRouterContext +%> +
+ <%=intl._t("Router I2CP Address")%> +
+ <%=intl._t("Host")%>: + " value="<%=editBean.getI2CPHost(curTunnel)%>" class="freetext" /> + + <%=intl._t("Port")%>: + " value="<%=editBean.getI2CPPort(curTunnel)%>" class="freetext" /> +
+ -
<%=intl._t("Custom options")%> @@ -941,4 +983,4 @@
+ diff --git a/apps/routerconsole/jsp/js/tableSlider.js b/apps/routerconsole/jsp/js/tableSlider.js new file mode 100644 index 0000000000..ddf8d096b9 --- /dev/null +++ b/apps/routerconsole/jsp/js/tableSlider.js @@ -0,0 +1,53 @@ +var hideableTables = document.querySelectorAll("table.tunnelConfig th"); + +hideableTables.forEach(function(configTable) { + configTable.onclick = function() { + function lookupTableRow() { + for (var i = 0, row; (row = configTable.offsetParent.rows[i]); i++) { + if (configTable.parentNode == row) { + return i; + } + } + return -1; + } + var collapseme = false; + for (var i = 0, row; (row = configTable.offsetParent.rows[i]); i++) { + var l = lookupTableRow(); + if (i > l) { + if (collapseme) { + if (row.firstElementChild.localName != "th") { + if ( + !row.firstElementChild.classList.contains("buttons") + ) { + row.style.visibility = "collapse"; + } + } + } else if (row.style.visibility == "visible") { + if (row.firstElementChild.localName != "th") { + if ( + !row.firstElementChild.classList.contains("buttons") + ) { + row.style.visibility = "collapse"; + collapseme = true; + configTable.classList.remove("tunnelConfigExpanded"); + } + } + } else { + row.style.visibility = "visible"; + configTable.classList.add("tunnelConfigExpanded"); + } + } + } + configTable.parentNode.style.visibility = "visible"; + }; + for (var i = 0, row; (row = configTable.offsetParent.rows[i]); i++) { + if (row.firstElementChild.localName != "th") { + if (!row.firstElementChild.classList.contains("buttons")) { + row.style.visibility = "collapse"; + } + } + } + for (var i = 0, row; (row = hideableTables[0].offsetParent.rows[i]); i++) { + row.style.visibility = "visible"; + } +}); diff --git a/installer/resources/themes/console/dark/i2ptunnel.css b/installer/resources/themes/console/dark/i2ptunnel.css index 1da11e2963..7f43e6bd37 100644 --- a/installer/resources/themes/console/dark/i2ptunnel.css +++ b/installer/resources/themes/console/dark/i2ptunnel.css @@ -245,10 +245,15 @@ h3 { margin: 0; } +.panel .tunnelConfig { + margin-top: 15px; +} + +th.tableTop { + font-size: 115%; +} + th { - /*background: #000; - background: linear-gradient(to bottom, #1a261a 0%, #223022 7%, #212f21 9%, #172317 21%, #091109 49%, #050d05 50%, #020602 51%, #010301 53%, #000000 56%, #000000 100%); - background: linear-gradient(to bottom, rgba(0,0,0,0) 50%, #000 50%), repeating-linear-gradient(to right, rgba(0,0,0,0.5) 1px, rgba(0,0,0,0.5) 2px, rgba(0,16,0,0.5) 2px, rgba(0,16,0,0.5) 4px), linear-gradient(to bottom, #002000, #000 75%);*/ padding: 7px 5px; border-top: 1px solid #7778bf; border-bottom: 1px solid #7778bf; @@ -299,6 +304,15 @@ td.infohelp { border-right: 1px solid #433e47; } +.tunnelConfigExpanded { + background: url(images/dropdown_active.png) left center no-repeat #1f1a24 !important; +} + +table.tunnelConfig th { + background: url(images/dropdown.png) left center no-repeat #1f1a24; + padding-left: 18px; +} + #clientTunnels tr, #serverTunnels tr, .tunnelConfig tr { background: #1F1A24; } diff --git a/installer/resources/themes/console/light/i2ptunnel.css b/installer/resources/themes/console/light/i2ptunnel.css index 59a9b223da..44aef0f2e9 100644 --- a/installer/resources/themes/console/light/i2ptunnel.css +++ b/installer/resources/themes/console/light/i2ptunnel.css @@ -413,9 +413,17 @@ h2, h3 { background: repeating-linear-gradient(135deg, rgba(255,255,255,0.5) 2px, rgba(240, 240, 255, 0.3) 3px, #fff 5px) #fff; } +.panel .tunnelConfig { + margin-top: 15px; +} + +th.tableTop { + font-size: 115%; +} + th { - background: #eef url(images/header.png) center center repeat-x; - background: linear-gradient(to bottom, #fff 50%, rgba(238, 238, 255, 0.2) 50%, #eef 100%) !important; + /*background: #eef url(images/header.png) center center repeat-x;*/ + background: linear-gradient(to bottom, #fff 50%, rgba(238, 238, 255, 0.2) 50%, #eef 100%); padding: 6px 5px; text-align: left; border-top: 1px solid #7778bf; @@ -483,6 +491,15 @@ td.infohelp { display: inline-block; } +.tunnelConfigExpanded { + background: url(images/dropdown_active.png) left center no-repeat #f8f8ff !important; +} + +table.tunnelConfig th { + background: url(images/dropdown.png) left center no-repeat #f8f8ff; + padding-left: 18px; +} + .tunnelProperties { background: #fafaff !important; } @@ -894,10 +911,14 @@ input.tunnelName, input.tunnelDescriptionText, #userAgents, .freetext.tunnelDesc /* more space */ -.freetext, .tunnelConfig textarea, #customOptions, #userAgents, #hostField { +.freetext, .tunnelConfig textarea, #userAgents, #hostField { margin: 5px !important; } +#customOptions { + margin-top: 15px !important; +} + #tunnelDepth, #tunnelVariance, #tunnelQuantity, #tunnelBackupQuantity, #tunnelDepthOut, #tunnelVarianceOut, #tunnelQuantityOut, #tunnelBackupQuantityOut, #leasesetKey { @@ -919,7 +940,7 @@ textarea[name="accessList"], #hostField, #localDestination, .authentication { height: 30px !important; } -#customOptions, #userAgents, #leasesetKey { +#userAgents, #leasesetKey { width: calc(100% - 20px) !important; } diff --git a/installer/resources/themes/console/light/images/dropdown.png b/installer/resources/themes/console/light/images/dropdown.png index 317d64e081..ef26e71826 100644 Binary files a/installer/resources/themes/console/light/images/dropdown.png and b/installer/resources/themes/console/light/images/dropdown.png differ