I2PSnark: Add icons to relevant parts of the UI; rejigging of UI to minimise space wastage; create new snark directory in console/themes/ .. snark dir will need to be ignored when router scans directory for theme dirs.

This commit is contained in:
z3d
2010-09-19 03:20:43 +00:00
parent 99d2e2d0d0
commit 321d88e795
17 changed files with 20 additions and 20 deletions

View File

@ -169,7 +169,7 @@ public class I2PSnarkServlet extends Default {
PrintWriter out = resp.getWriter(); PrintWriter out = resp.getWriter();
out.write("<html>\n" + out.write("<html>\n" +
"<head><link rel=\"shortcut icon\" href=\"/themes/console/snark_favicon.ico\">\n" + "<head><link rel=\"shortcut icon\" href=\"/themes/console/snark/favicon.ico\">\n" +
"<title>"); "<title>");
out.write(_("I2PSnark - Anonymous BitTorrent Client")); out.write(_("I2PSnark - Anonymous BitTorrent Client"));
out.write("</title>\n"); out.write("</title>\n");
@ -190,7 +190,7 @@ public class I2PSnarkServlet extends Default {
out.write("<div class=\"snarknavbar\"><a href=\"" + req.getRequestURI() + peerString + "\" title=\""); out.write("<div class=\"snarknavbar\"><a href=\"" + req.getRequestURI() + peerString + "\" title=\"");
out.write(_("Refresh page")); out.write(_("Refresh page"));
out.write("\" class=\"snarkRefresh\">"); out.write("\" class=\"snarkRefresh\">");
out.write(_("I2PSnark")); out.write(_("<img border=\"0\" src=\"/themes/console/snark/images/arrow_refresh.png\"> I2PSnark"));
out.write("</a> <a href=\"http://forum.i2p/viewforum.php?f=21\" class=\"snarkRefresh\" target=\"_blank\">"); out.write("</a> <a href=\"http://forum.i2p/viewforum.php?f=21\" class=\"snarkRefresh\" target=\"_blank\">");
out.write(_("Forum")); out.write(_("Forum"));
out.write("</a>\n"); out.write("</a>\n");
@ -253,15 +253,15 @@ public class I2PSnarkServlet extends Default {
out.write("</th>\n<th align=\"left\">"); out.write("</th>\n<th align=\"left\">");
out.write(_("Torrent")); out.write(_("Torrent"));
out.write("</th>\n<th align=\"center\">"); out.write("</th>\n<th align=\"center\">");
out.write(_("ETA")); out.write(_("<img border=\"0\" src=\"/themes/console/snark/images/eta.png\" title=\"Estimated Download Time\">ETA"));
out.write("</th>\n<th align=\"center\">"); out.write("</th>\n<th align=\"center\">");
out.write(_("RX")); out.write(_("<img border=\"0\" src=\"/themes/console/images/inbound.png\" title=\"Data Downloaded\">RX"));
out.write("</th>\n<th align=\"center\">"); out.write("</th>\n<th align=\"center\">");
out.write(_("TX")); out.write(_("<img border=\"0\" src=\"/themes/console/images/outbound.png\" title=\"Data Uploaded\">TX"));
out.write("</th>\n<th align=\"center\">"); out.write("</th>\n<th align=\"center\">");
out.write(_("RX Rate")); out.write(_("<img border=\"0\" src=\"/themes/console/images/inbound.png\" title=\"Download Speed\">Rate"));
out.write("</th>\n<th align=\"center\">"); out.write("</th>\n<th align=\"center\">");
out.write(_("TX Rate")); out.write(_("<img border=\"0\" src=\"/themes/console/images/outbound.png\" title=\"Upload Speed\">Rate"));
out.write("</th>\n"); out.write("</th>\n");
out.write("<th align=\"center\">"); out.write("<th align=\"center\">");
@ -745,10 +745,10 @@ public class I2PSnarkServlet extends Default {
if (e < 0) if (e < 0)
continue; continue;
baseURL = baseURL.substring(e + 1); baseURL = baseURL.substring(e + 1);
out.write("&nbsp;&raquo;&nbsp;<a href=\"" + baseURL + "details.php?dllist=1&filelist=1&info_hash="); out.write("&nbsp;<a href=\"" + baseURL + "details.php?dllist=1&filelist=1&info_hash=");
out.write(TrackerClient.urlencode(snark.meta.getInfoHash())); out.write(TrackerClient.urlencode(snark.meta.getInfoHash()));
out.write("\" title=\"" + name + ' ' + _("Tracker") + "\">"); out.write("\" title=\"" + name + ' ' + _("Tracker") + "\" target=\"_blank\">");
out.write(_("Details")); out.write(_("<img border=\"0\" src=\"/themes/console/snark/images/details.png\">"));
out.write("</a>"); out.write("</a>");
break; break;
} }
@ -924,13 +924,13 @@ public class I2PSnarkServlet extends Default {
out.write("<input type=\"hidden\" name=\"nonce\" value=\"" + _nonce + "\" >\n"); out.write("<input type=\"hidden\" name=\"nonce\" value=\"" + _nonce + "\" >\n");
out.write("<input type=\"hidden\" name=\"action\" value=\"Add\" >\n"); out.write("<input type=\"hidden\" name=\"action\" value=\"Add\" >\n");
out.write("<div class=\"addtorrentsection\"><span class=\"snarkConfigTitle\">"); out.write("<div class=\"addtorrentsection\"><span class=\"snarkConfigTitle\">");
out.write(_("Add Torrent")); out.write(_("<img border=\"0\" src=\"/themes/console/snark/images/add.png\">Add Torrent"));
out.write("</span><hr>\n<table border=\"0\"><tr><td>"); out.write("</span><hr>\n<table border=\"0\"><tr><td>");
out.write(_("From URL")); out.write(_("From URL"));
out.write(":<td><input type=\"text\" name=\"newURL\" size=\"80\" value=\"" + newURL + "\" > \n"); out.write(":<td><input type=\"text\" name=\"newURL\" size=\"80\" value=\"" + newURL + "\" > \n");
// not supporting from file at the moment, since the file name passed isn't always absolute (so it may not resolve) // not supporting from file at the moment, since the file name passed isn't always absolute (so it may not resolve)
//out.write("From file: <input type=\"file\" name=\"newFile\" size=\"50\" value=\"" + newFile + "\" /><br>\n"); //out.write("From file: <input type=\"file\" name=\"newFile\" size=\"50\" value=\"" + newFile + "\" /><br>");
out.write("<tr><td>&nbsp;<td><input type=\"submit\" value=\""); out.write("<input type=\"submit\" value=\"");
out.write(_("Add torrent")); out.write(_("Add torrent"));
out.write("\" name=\"foo\" ><br>\n"); out.write("\" name=\"foo\" ><br>\n");
out.write("<tr><td>&nbsp;<td><span class=\"snarkAddInfo\">"); out.write("<tr><td>&nbsp;<td><span class=\"snarkAddInfo\">");
@ -955,7 +955,7 @@ public class I2PSnarkServlet extends Default {
out.write("<input type=\"hidden\" name=\"nonce\" value=\"" + _nonce + "\" >\n"); out.write("<input type=\"hidden\" name=\"nonce\" value=\"" + _nonce + "\" >\n");
out.write("<input type=\"hidden\" name=\"action\" value=\"Create\" >\n"); out.write("<input type=\"hidden\" name=\"action\" value=\"Create\" >\n");
out.write("<span class=\"snarkConfigTitle\">"); out.write("<span class=\"snarkConfigTitle\">");
out.write(_("Create Torrent")); out.write(_("<img border=\"0\" src=\"/themes/console/snark/images/create.png\">Create Torrent"));
out.write("</span><hr>\n<table border=\"0\"><tr><td>"); out.write("</span><hr>\n<table border=\"0\"><tr><td>");
//out.write("From file: <input type=\"file\" name=\"newFile\" size=\"50\" value=\"" + newFile + "\" /><br>\n"); //out.write("From file: <input type=\"file\" name=\"newFile\" size=\"50\" value=\"" + newFile + "\" /><br>\n");
out.write(_("Data to seed")); out.write(_("Data to seed"));
@ -979,12 +979,12 @@ public class I2PSnarkServlet extends Default {
out.write("\t<option value=\"" + announceURL + "\">" + name + "</option>\n"); out.write("\t<option value=\"" + announceURL + "\">" + name + "</option>\n");
} }
out.write("</select>\n"); out.write("</select>\n");
out.write(_("or")); out.write(_("or&nbsp;"));
out.write("<tr><td>&nbsp;<td><input type=\"text\" name=\"announceURLOther\" size=\"50\" value=\"http://\" " + out.write("<input type=\"text\" name=\"announceURLOther\" size=\"50\" value=\"http://\" " +
"title=\""); "title=\"");
out.write(_("Specify custom tracker announce URL")); out.write(_("Specify custom tracker announce URL"));
out.write("\" > "); out.write("\" > ");
out.write("<tr><td>&nbsp;<td><input type=\"submit\" value=\""); out.write("<input type=\"submit\" value=\"");
out.write(_("Create torrent")); out.write(_("Create torrent"));
out.write("\" name=\"foo\" ></table>\n"); out.write("\" name=\"foo\" ></table>\n");
out.write("</form>\n</span></div>"); out.write("</form>\n</span></div>");
@ -1003,7 +1003,7 @@ public class I2PSnarkServlet extends Default {
out.write("<input type=\"hidden\" name=\"nonce\" value=\"" + _nonce + "\" >\n"); out.write("<input type=\"hidden\" name=\"nonce\" value=\"" + _nonce + "\" >\n");
out.write("<input type=\"hidden\" name=\"action\" value=\"Save\" >\n"); out.write("<input type=\"hidden\" name=\"action\" value=\"Save\" >\n");
out.write("<span class=\"snarkConfigTitle\">"); out.write("<span class=\"snarkConfigTitle\">");
out.write(_("Configuration")); out.write(_("<img border=\"0\" src=\"/themes/console/snark/images/config.png\">Configuration"));
out.write("</span><hr>\n"); out.write("</span><hr>\n");
out.write("<table border=\"0\"><tr><td>"); out.write("<table border=\"0\"><tr><td>");
out.write(_("Data directory")); out.write(_("Data directory"));
@ -1130,7 +1130,7 @@ public class I2PSnarkServlet extends Default {
private void writeConfigLink(PrintWriter out) throws IOException { private void writeConfigLink(PrintWriter out) throws IOException {
out.write("<div class=\"configsection\"><span class=\"snarkConfig\">\n"); out.write("<div class=\"configsection\"><span class=\"snarkConfig\">\n");
out.write("<span class=\"snarkConfigTitle\"><a href=\"configure\">"); out.write("<span class=\"snarkConfigTitle\"><a href=\"configure\">");
out.write(_("Configuration")); out.write(_("<img border=\"0\" src=\"/themes/console/snark/images/config.png\">Configuration"));
out.write("</a></span></span></div>\n"); out.write("</a></span></span></div>\n");
} }
@ -1203,7 +1203,7 @@ public class I2PSnarkServlet extends Default {
return buf.toString(); return buf.toString();
} }
private static final String HEADER = "<link href=\"/themes/console/snark.css\" rel=\"stylesheet\" type=\"text/css\" >"; private static final String HEADER = "<link href=\"/themes/console/snark/snark.css\" rel=\"stylesheet\" type=\"text/css\" >";
private static final String TABLE_HEADER = "<table border=\"0\" class=\"snarkTorrents\" width=\"100%\" cellpadding=\"0 10px\">\n" + private static final String TABLE_HEADER = "<table border=\"0\" class=\"snarkTorrents\" width=\"100%\" cellpadding=\"0 10px\">\n" +

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 584 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 561 B

View File

Before

Width:  |  Height:  |  Size: 571 B

After

Width:  |  Height:  |  Size: 571 B

View File

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 121 B

After

Width:  |  Height:  |  Size: 121 B

View File

Before

Width:  |  Height:  |  Size: 167 B

After

Width:  |  Height:  |  Size: 167 B

View File

Before

Width:  |  Height:  |  Size: 193 B

After

Width:  |  Height:  |  Size: 193 B