forked from I2P_Developers/i2p.i2p
i2psnark: Minor details page reformatting
This commit is contained in:
@@ -2714,7 +2714,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
if (snark != null) {
|
||||
// first table - torrent info
|
||||
buf.append("<table class=\"snarkTorrentInfo\">\n");
|
||||
buf.append("<tr><th><b>")
|
||||
buf.append("<tr><th></th><th><b>")
|
||||
.append(_t("Torrent"))
|
||||
.append(":</b> ")
|
||||
.append(DataHelper.escapeHTML(snark.getBaseName()))
|
||||
@@ -2724,7 +2724,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
String baseName = encodePath((new File(fullPath)).getName());
|
||||
buf.append("<tr><td>");
|
||||
toThemeImg(buf, "file");
|
||||
buf.append(" <b>")
|
||||
buf.append("</td><td><b>")
|
||||
.append(_t("Torrent file"))
|
||||
.append(":</b> <a href=\"").append(_contextPath).append('/').append(baseName).append("\">")
|
||||
.append(DataHelper.escapeHTML(fullPath))
|
||||
@@ -2732,7 +2732,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
if (snark.getStorage() != null) {
|
||||
buf.append("<tr><td>");
|
||||
toThemeImg(buf, "file");
|
||||
buf.append(" <b>")
|
||||
buf.append("</td><td><b>")
|
||||
.append(_t("Data location"))
|
||||
.append(":</b> ")
|
||||
.append(DataHelper.escapeHTML(snark.getStorage().getBase().getPath()))
|
||||
@@ -2741,7 +2741,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
String hex = I2PSnarkUtil.toHex(snark.getInfoHash());
|
||||
buf.append("<tr><td>");
|
||||
toThemeImg(buf, "details");
|
||||
buf.append(" <b>")
|
||||
buf.append("</td><td><b>")
|
||||
.append(_t("Info hash"))
|
||||
.append(":</b> ")
|
||||
.append(hex.toUpperCase(Locale.US))
|
||||
@@ -2761,7 +2761,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
buf.append(trackerLink);
|
||||
else
|
||||
toThemeImg(buf, "details");
|
||||
buf.append(" <b>").append(_t("Primary Tracker")).append(":</b> ");
|
||||
buf.append("</td><td><b>").append(_t("Primary Tracker")).append(":</b> ");
|
||||
buf.append(getShortTrackerLink(announce, snark.getInfoHash()));
|
||||
buf.append("</td></tr>");
|
||||
}
|
||||
@@ -2769,7 +2769,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
if (alist != null && !alist.isEmpty()) {
|
||||
buf.append("<tr><td>");
|
||||
toThemeImg(buf, "details");
|
||||
buf.append(" <b>")
|
||||
buf.append("</td><td valign=\"top\"><b>")
|
||||
.append(_t("Tracker List")).append(":</b> ");
|
||||
for (List<String> alist2 : alist) {
|
||||
buf.append('[');
|
||||
@@ -2794,7 +2794,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
com = com.substring(0, 1024);
|
||||
buf.append("<tr><td>");
|
||||
toThemeImg(buf, "details");
|
||||
buf.append(" <b>")
|
||||
buf.append("</td><td><b>")
|
||||
.append(_t("Comment")).append(":</b> ")
|
||||
.append(DataHelper.stripHTML(com))
|
||||
.append("</td></tr>\n");
|
||||
@@ -2808,7 +2808,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
String date = fmt.format(new Date(dat));
|
||||
buf.append("<tr><td>");
|
||||
toThemeImg(buf, "details");
|
||||
buf.append(" <b>")
|
||||
buf.append("</td><td><b>")
|
||||
.append(_t("Created")).append(":</b> ")
|
||||
.append(date)
|
||||
.append("</td></tr>\n");
|
||||
@@ -2819,7 +2819,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
cby = com.substring(0, 128);
|
||||
buf.append("<tr><td>");
|
||||
toThemeImg(buf, "details");
|
||||
buf.append(" <b>")
|
||||
buf.append("</td><td><b>")
|
||||
.append(_t("Created By")).append(":</b> ")
|
||||
.append(DataHelper.stripHTML(cby))
|
||||
.append("</td></tr>\n");
|
||||
@@ -2829,7 +2829,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
String date = fmt.format(new Date(dates[0]));
|
||||
buf.append("<tr><td>");
|
||||
toThemeImg(buf, "details");
|
||||
buf.append(" <b>")
|
||||
buf.append("</td><td><b>")
|
||||
.append(_t("Added")).append(":</b> ")
|
||||
.append(date)
|
||||
.append("</td></tr>\n");
|
||||
@@ -2838,7 +2838,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
String date = fmt.format(new Date(dates[1]));
|
||||
buf.append("<tr><td>");
|
||||
toThemeImg(buf, "details");
|
||||
buf.append(" <b>")
|
||||
buf.append("</td><td><b>")
|
||||
.append(_t("Completed")).append(":</b> ")
|
||||
.append(date)
|
||||
.append("</td></tr>\n");
|
||||
@@ -2852,7 +2852,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
buf.append("&tr=").append(announce);
|
||||
buf.append("\">")
|
||||
.append(toImg("magnet", _t("Magnet link")))
|
||||
.append("</a> <b>Magnet:</b> <a href=\"")
|
||||
.append("</a></td><td><b>Magnet:</b> <a href=\"")
|
||||
.append(MagnetURI.MAGNET_FULL).append(hex);
|
||||
if (announce != null)
|
||||
buf.append("&tr=").append(announce);
|
||||
@@ -2863,7 +2863,9 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
buf.append("</a>")
|
||||
.append("</td></tr>\n");
|
||||
} else {
|
||||
buf.append("<tr><td>")
|
||||
buf.append("<tr><td>");
|
||||
toThemeImg(buf, "details");
|
||||
buf.append("</td><td><b>")
|
||||
.append(_t("Private torrent"))
|
||||
.append("</td></tr>\n");
|
||||
}
|
||||
@@ -2874,7 +2876,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
|
||||
buf.append("<tr><td>");
|
||||
toThemeImg(buf, "size");
|
||||
buf.append(" <b>")
|
||||
buf.append("</td><td><b>")
|
||||
.append(_t("Size"))
|
||||
.append(":</b> ")
|
||||
.append(formatSize(snark.getTotalLength()));
|
||||
@@ -2943,20 +2945,19 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
|
||||
// buttons
|
||||
if (showStopStart) {
|
||||
buf.append("<tr><td>");
|
||||
toThemeImg(buf, "file");
|
||||
buf.append("<tr><td></td><td>");
|
||||
if (snark.isChecking()) {
|
||||
buf.append(" <b>").append(_t("Checking")).append("… ")
|
||||
buf.append("<b>").append(_t("Checking")).append("… ")
|
||||
.append((new DecimalFormat("0.00%")).format(snark.getCheckingProgress()))
|
||||
.append(" <a href=\"").append(base).append("\">")
|
||||
.append(_t("Refresh page for results")).append("</a>");
|
||||
} else if (snark.isStarting()) {
|
||||
buf.append(" <b>").append(_t("Starting")).append("…</b>");
|
||||
buf.append("<b>").append(_t("Starting")).append("…</b>");
|
||||
} else if (snark.isAllocating()) {
|
||||
buf.append(" <b>").append(_t("Allocating")).append("…</b>");
|
||||
buf.append("<b>").append(_t("Allocating")).append("…</b>");
|
||||
} else {
|
||||
boolean isRunning = !snark.isStopped();
|
||||
buf.append(" <input type=\"submit\" value=\"");
|
||||
buf.append("<input type=\"submit\" value=\"");
|
||||
if (isRunning)
|
||||
buf.append(_t("Stop")).append("\" name=\"stop\" class=\"stoptorrent\">\n");
|
||||
else
|
||||
|
Reference in New Issue
Block a user