forked from I2P_Developers/i2p.i2p
Show the I2PSnark dest on the main page (#1436)
This commit is contained in:
@ -456,7 +456,7 @@ public class I2PSnarkUtil {
|
||||
return null;
|
||||
}
|
||||
|
||||
String getOurIPString() {
|
||||
public String getOurIPString() {
|
||||
Destination dest = getMyDestination();
|
||||
if (dest != null)
|
||||
return dest.toBase64();
|
||||
|
@ -670,6 +670,16 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
out.write("<tfoot><tr>\n" +
|
||||
" <th align=\"left\" colspan=\"6\">");
|
||||
out.write(" ");
|
||||
out.write(_("Dest: "));
|
||||
String IPString = _manager.util().getOurIPString();
|
||||
if(!IPString.equals("unknown")) {
|
||||
// Only truncate if it's an actual dest
|
||||
IPString = "<i>" + IPString.substring(0, 4) + "</i>";
|
||||
} else {
|
||||
IPString = IPString + ".";
|
||||
}
|
||||
out.write(IPString);
|
||||
out.write(" ");
|
||||
out.write(_("Totals"));
|
||||
out.write(": ");
|
||||
out.write(ngettext("1 torrent", "{0} torrents", total));
|
||||
|
Reference in New Issue
Block a user