forked from I2P_Developers/i2p.i2p
i2ptunnel: Hide description label if none
Identify shared clients on index page
This commit is contained in:
@@ -132,10 +132,6 @@ public class EditBean extends IndexBean {
|
||||
return _helper.shouldStartAutomatically(tunnel);
|
||||
}
|
||||
|
||||
public boolean isSharedClient(int tunnel) {
|
||||
return _helper.isSharedClient(tunnel);
|
||||
}
|
||||
|
||||
public boolean shouldDelay(int tunnel) {
|
||||
return _helper.shouldDelayConnect(tunnel);
|
||||
}
|
||||
|
||||
@@ -378,6 +378,13 @@ public class IndexBean {
|
||||
public static boolean isClient(String type) {
|
||||
return TunnelController.isClient(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.9.46 moved from subclass
|
||||
*/
|
||||
public boolean isSharedClient(int tunnel) {
|
||||
return _helper.isSharedClient(tunnel);
|
||||
}
|
||||
|
||||
public String getTunnelName(int tunnel) {
|
||||
String name = _helper.getTunnelName(tunnel);
|
||||
|
||||
@@ -179,8 +179,18 @@
|
||||
%>
|
||||
<tr>
|
||||
<td class="tunnelDescription" colspan="6">
|
||||
<%
|
||||
String descr = indexBean.getTunnelDescription(curServer);
|
||||
if (descr != null && descr.length() > 0) {
|
||||
%>
|
||||
<span class="tunnelDestinationLabel"><b><%=intl._t("Description")%>:</b></span>
|
||||
<%=indexBean.getTunnelDescription(curServer)%>
|
||||
<%=descr%>
|
||||
<%
|
||||
} else {
|
||||
// needed to make the spacing look right
|
||||
%> <%
|
||||
} // descr
|
||||
%>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
@@ -299,12 +309,32 @@
|
||||
<% /* TODO SSL outproxy for httpclient if plugin not present */ %>
|
||||
<tr>
|
||||
<td class="tunnelDescription" colspan="6">
|
||||
<span class="tunnelDescriptionLabel"><b><%=intl._t("Description")%>:</b></span>
|
||||
<%=indexBean.getTunnelDescription(curClient)%>
|
||||
<%
|
||||
boolean isShared = indexBean.isSharedClient(curClient);
|
||||
String descr = indexBean.getTunnelDescription(curClient);
|
||||
if (isShared || (descr != null && descr.length() > 0)) {
|
||||
%>
|
||||
<span class="tunnelDescriptionLabel">
|
||||
<%
|
||||
if (isShared) {
|
||||
%><b><%=intl._t("Shared Client")%><%
|
||||
} else {
|
||||
%><b><%=intl._t("Description")%><%
|
||||
}
|
||||
if (descr != null && descr.length() > 0) {
|
||||
%>:</b></span> <%=descr%><%
|
||||
} else {
|
||||
%></b></span><%
|
||||
}
|
||||
} else {
|
||||
// needed to make the spacing look right
|
||||
%> <%
|
||||
} // descr
|
||||
%>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
} // for loop
|
||||
%>
|
||||
<tr>
|
||||
<td class="newTunnel" colspan="6">
|
||||
|
||||
Reference in New Issue
Block a user