Show the I2PSnark dest on the main page (#1436)

This commit is contained in:
dg2-new
2015-05-15 20:51:45 +00:00
parent 38f2b93c7a
commit b3472cfe80
3 changed files with 12 additions and 2 deletions

View File

@ -456,7 +456,7 @@ public class I2PSnarkUtil {
return null; return null;
} }
String getOurIPString() { public String getOurIPString() {
Destination dest = getMyDestination(); Destination dest = getMyDestination();
if (dest != null) if (dest != null)
return dest.toBase64(); return dest.toBase64();

View File

@ -670,6 +670,16 @@ public class I2PSnarkServlet extends BasicServlet {
out.write("<tfoot><tr>\n" + out.write("<tfoot><tr>\n" +
" <th align=\"left\" colspan=\"6\">"); " <th align=\"left\" colspan=\"6\">");
out.write("&nbsp;"); out.write("&nbsp;");
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("&nbsp;");
out.write(_("Totals")); out.write(_("Totals"));
out.write(":&nbsp;"); out.write(":&nbsp;");
out.write(ngettext("1 torrent", "{0} torrents", total)); out.write(ngettext("1 torrent", "{0} torrents", total));

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */ /** deprecated */
public final static String ID = "Monotone"; public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION; public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 24; public final static long BUILD = 25;
/** for example "-test" */ /** for example "-test" */
public final static String EXTRA = "-rc"; public final static String EXTRA = "-rc";