Clarify choices on address helper save page (ticket #1940)

This commit is contained in:
str4d
2017-05-20 08:09:30 +00:00
parent 62b3e19217
commit 0db637ed5a
11 changed files with 452 additions and 70 deletions

View File

@ -1347,38 +1347,57 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
Writer out = new BufferedWriter(new OutputStreamWriter(outs, "UTF-8"));
String header = getErrorPage("ahelper-new", ERR_AHELPER_NEW);
out.write(header);
out.write("<table><tr><td class=\"mediumtags\" align=\"right\">" + _t("Host") +
"</td><td class=\"mediumtags\">" + destination + "</td></tr>\n");
out.write("<table id=\"proxyNewHost\">\n<tr><td align=\"right\">" + _t("Host") +
"</td><td>" + destination + "</td></tr>\n");
try {
String b32 = Base32.encode(SHA256Generator.getInstance().calculateHash(Base64.decode(ahelperKey)).getData());
out.write("<tr><td class=\"mediumtags\" align=\"right\">" + _t("Base 32") + "</td>" +
out.write("<tr><td align=\"right\">" + _t("Base 32") + "</td>" +
"<td><a href=\"http://" + b32 + ".b32.i2p/\">" + b32 + ".b32.i2p</a></td></tr>");
} catch(Exception e) {
}
out.write("<tr><td class=\"mediumtags\" align=\"right\">" + _t("Destination") + "</td><td>" +
"<textarea rows=\"1\" style=\"height: 4em; min-width: 0; min-height: 0;\" cols=\"70\" wrap=\"off\" readonly=\"readonly\" >" +
ahelperKey + "</textarea></td></tr></table>\n" +
"<hr><div class=\"formaction\">" +
out.write("<tr><td align=\"right\">" + _t("Destination") + "</td><td>" +
"<textarea rows=\"1\" style=\"height: 6em; min-width: 0; min-height: 0;\" cols=\"70\" wrap=\"off\" readonly=\"readonly\" >" + ahelperKey + "</textarea>" +
"</td></tr>\n</table>\n" + "<hr>\n" +
// FIXME if there is a query remaining it is lost
"<form method=\"GET\" action=\"" + targetRequest + "\">" +
"<button type=\"submit\" class=\"go\">" + _t("Continue to {0} without saving", destination) + "</button>" +
"</form>\n<form method=\"GET\" action=\"http://" + LOCAL_SERVER + "/add\">" +
"<form method=\"GET\" action=\"" + targetRequest + "\">\n" +
"<h4>" + _t("Continue to {0} without saving", destination) + "</h4>\n<p>" +
_t("You can browse to the site without saving it to the address book. The address will be remembered until you restart your I2P router.") +
"</p>\n<div class=\"formaction\"><button type=\"submit\" class=\"go\">" + _t("Continue without saving") + "</button></div>" + "\n</form>\n" +
"<form method=\"GET\" action=\"http://" + LOCAL_SERVER + "/add\">\n" +
"<input type=\"hidden\" name=\"host\" value=\"" + destination + "\">\n" +
"<input type=\"hidden\" name=\"dest\" value=\"" + ahelperKey + "\">\n" +
"<input type=\"hidden\" name=\"nonce\" value=\"" + _proxyNonce + "\">\n" +
"<button type=\"submit\" class=\"accept\" name=\"router\" value=\"router\">" +
_t("Save {0} to router address book and continue to website", destination) + "</button><br>\n");
"<h4>" + _t("Save {0} to Router address book and continue to website", destination) + "</h4>\n<p>" +
_t("This address will be saved to your Router address book where your subscription-based addresses are stored."));
if(_context.namingService().getName().equals("BlockfileNamingService")) {
out.write(" " + _t("If you want to keep track of sites you have added manually, add to your Master or Private address book instead."));
}
out.write("</p>\n<div class=\"formaction\"><button type=\"submit\" class=\"accept\" name=\"router\" value=\"router\">" +
_t("Save & continue") + "</button></div>\n");
if(_context.namingService().getName().equals("BlockfileNamingService")) {
// only blockfile supports multiple books
out.write("<br><button type=\"submit\" name=\"master\" value=\"master\">" + _t("Save {0} to master address book and continue to website", destination) + "</button><br>\n");
out.write("<button type=\"submit\" name=\"private\" value=\"private\">" + _t("Save {0} to private address book and continue to website", destination) + "</button>\n");
out.write("<h4>" + _t("Save {0} to Master address book and continue to website", destination) + "</h4>\n<p>" +
_t("This address will be saved to your Master address book. Select this option for addresses you wish to keep separate from the main router address book, but don't mind publishing.") +
"</p>\n<div class=\"formaction\"><button type=\"submit\" class=\"accept\" name=\"master\" value=\"master\">" +
_t("Save & continue") + "</button></div>\n");
out.write("<h4>" + _t("Save {0} to Private address book and continue to website", destination) + "</h4>\n<p>" +
_t("This address will be saved to your Private address book, ensuring it is never published.") +
"</p>\n<div class=\"formaction\"><button type=\"submit\" class=\"accept\" name=\"private\" value=\"private\">" +
_t("Save & continue") + "</button></div>\n");
}
// Firefox (and others?) don't send referer to meta refresh target, which is
// what the jump servers use, so this isn't that useful.
if (referer != null)
out.write("<input type=\"hidden\" name=\"referer\" value=\"" + referer + "\">\n");
out.write("<input type=\"hidden\" name=\"url\" value=\"" + targetRequest + "\">\n" +
"</form></div></div>");
"</form>\n</div>\n");
writeFooter(out);
}

View File

@ -743,9 +743,9 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem
if (first) {
first = false;
out.write("<br><br>\n<div id=\"jumplinks\">\n<h3>");
out.write("<br><br>\n<div id=\"jumplinks\">\n<h4>");
out.write(_t("Click a link below for an address helper from a jump service"));
out.write("</h3>\n");
out.write("</h4>\n");
} else {
out.write("<br>");
}

View File

@ -70,7 +70,7 @@
</td></tr>
<% } else { %>
<tr><td>
<%=intl._t("To make changes, edit the file {0}.", "<tt>" + advancedhelper.getConfigFileName() + "</tt>")%>
<%=intl._t("To make changes, edit the file: {0}", "<tt>" + advancedhelper.getConfigFileName() + "</tt>")%>
</td></tr>
<% } // isAdvanced %>
<tr><td class="tabletextarea">

View File

@ -1,5 +1,6 @@
2017-05-20 str4d
* Console:
- Clarify choices on address helper save page (ticket #1940)
- Add router.hideFloodfillParticipant to advanced settings help
* i2psnark:
- Make DHT debug section collapsible

View File

@ -6,12 +6,13 @@ Connection: close
Proxy-Connection: close
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<html>
<head>
<title>_("Information: New Host Name")</title>
<link rel="shortcut icon" href="http://proxy.i2p/themes/console/images/favicon.ico">
<link href="http://proxy.i2p/themes/console/default/console.css" rel="stylesheet" type="text/css">
</head>
<body>
<body id="proxyNewAddressHelper">
<div class="logo">
<a href="http://127.0.0.1:7657/" title="_("Router Console")"><img src="http://proxy.i2p/themes/console/images/i2plogo.png" alt="_("I2P Router Console")" border="0"></a><hr>
<a href="http://127.0.0.1:7657/config.jsp">_("Configuration")</a> <a href="http://127.0.0.1:7657/help.jsp">_("Help")</a> <a href="http://127.0.0.1:7657/susidns/index">_("Addressbook")</a>

View File

@ -130,6 +130,10 @@ img {
margin: 5px 0;
}
#jumplinks {
margin-bottom: -22px;
}
#jumplinks h3 {
border: 0;
border-top: 1px solid #fb7;
@ -143,16 +147,17 @@ img {
.warning h3:first-child {
margin: 2px -18px 10px -18px;
padding: 10px 10px 10px 38px;
padding: 10px 10px 8px 35px;
background: #ffe !important;
background: #ffe url(/themes/console/images/itoopie_sm.png) 6px center no-repeat !important;
background-size: auto 80% !important;
background: #ffe url(/themes/console/images/itoopie_sm.png) 8px center no-repeat !important;
background-size: auto 75% !important;
background-position: 8px calc(50% + 2px) !important;
border: none;
border-bottom: 1px solid #fb7;
text-transform: uppercase;
letter-spacing: 0.08em;
word-spacing: 0.1em;
font-size: 12.5pt;
font-size: 12pt;
}
.warning p {
@ -178,8 +183,6 @@ img {
}
.warning button {
min-width: 450px;
margin-bottom: 5px;
margin-right: 0;
}
@ -224,6 +227,77 @@ img {
color: #6b4612;
}
#proxyNewAddressHelper .proxyfooter {
display: none;
}
#proxyNewAddressHelper .warning {
padding-bottom: 0 !important;
}
#proxyNewHost {
margin-bottom: 15px;
}
#proxyNewHost td {
padding: 8px !important;
font-size: 10pt !important;
}
#proxyNewHost td:first-child {
font-weight: bold;
}
#proxyNewHost textarea {
white-space: pre-wrap;
word-break: break-all;
overflow: auto;
border: none;
resize: none;
background: none !important;
box-shadow: none !important;
width: 100% !important;
height: 6em;
margin: 0 !important;
padding: 0 !important;
}
#proxyNewHost textarea:focus {
filter: none;
}
#proxyNewHost + hr {
display: none;
}
.warning h4 {
box-shadow: none !important;
text-align: left;
font-size: 10pt;
margin: 0 -18px -5px;
background: #ffe;
border: 1px solid #fb7;
border-left: none;
border-right: none;
padding: 8px 10px;
}
#jumplinks h4 {
margin: 15px -18px 8px;
}
#proxyNewHost a {
display: inline-block;
word-break: break-all;
}
.warning p + .formaction {
margin: -5px -5px 10px 0;
padding: 0;
}
/* end proxy errors */
/* console error messages */
.sorry {
@ -2349,6 +2423,10 @@ div.configure h2:first-child {
text-align: left;
}
.messages .error li, .messages .error ul {
margin: 0 !important;
}
.messages li {
padding-left: 60px !important
}
@ -5250,16 +5328,16 @@ input[name="pluginURL"] {
margin: 140px 5px 0 !important;
}
.warning h3:first-child {
font-size: 11pt;
}
.logo a:nth-child(n+2) {
width: 25%;
white-space: nowrap;
font-size: 10pt;
}
#jumplinks {
margin-bottom: -15px;
}
.proxyfooter {
display: none;
}

View File

@ -127,9 +127,8 @@ div.warning {
text-align: justify;
background: #000 url(/themes/console/images/itoopie_sm.png) 10px center no-repeat;
background: url(/themes/console/images/itoopie_sm.png) 10px center no-repeat, url(images/camotile2.png);
box-shadow: inset 0 0 0 1px #700;
box-shadow: inset 0 0 0 1px #700, inset 0 0 3px 3px #000;
box-shadow: inset 0 0 0 1px #700, inset 0 0 3px 3px #000, 0 0 0 2px #000;;
background-position: 10px calc(50% + 16px);
box-shadow: inset 0 0 0 1px #700, inset 0 0 3px 3px #000, 0 0 0 2px #000;
word-wrap: break-word;
font-size: 10pt;
min-width: 300px;
@ -141,19 +140,31 @@ div.warning {
.warning p, .warning a {
font-size: 10pt
}
.warning a {
line-height: 150%;
line-height: 130%;
}
.warning p {
margin: 0 0 10px;
}
.warning h3 {
font-size: 10pt;
padding: 7px 10px;
text-align: left;
margin: -9px -24px 15px -74px;
border: none;
border-bottom: 1px solid #700;
}
.warning h4 {
font-size: 10pt;
box-shadow: none;
margin: 12px 0 5px;
padding: 0 0 5px;
}
#jumplinks h4 {
margin-bottom: 10px;
}
#jumplinks a {
@ -171,8 +182,66 @@ div.warning {
line-height: 16px;
}
/* end proxy errors */
#proxyNewAddressHelper .proxyfooter {
display: none;
}
#proxyNewAddressHelper .warning {
padding-bottom: 0 !important;
}
#proxyNewHost {
margin-bottom: 20px;
}
#proxyNewHost td {
padding: 8px !important;
font-size: 10pt !important;
}
#proxyNewHost td:first-child {
font-weight: bold;
}
#proxyNewHost textarea {
white-space: pre-wrap;
word-break: break-all;
overflow: auto;
border: none;
resize: none;
background: none !important;
box-shadow: none !important;
width: 100% !important;
height: 6em;
margin: 0 !important;
padding: 0 !important;
}
#proxyNewHost textarea:focus {
filter: none;
}
#proxyNewHost + hr {
display: none;
}
.warning h4 {
box-shadow: none !important;
text-align: left;
font-size: 10pt;
}
#proxyNewHost a {
display: inline-block;
word-break: break-all;
}
.warning p + .formaction {
margin: 0 0 20px;
padding: 0;
}
/* end proxy errors */
div.routersummaryouter {
float: left;
@ -4345,7 +4414,7 @@ button.search {
max-height: 32px;
max-width: 32px;
padding: 10px 52px 38px;
margin: -8px 0 1px;
margin: -4px 0 1px;
/* filter: sepia(100%) hue-rotate(70deg); enable for green-tinted app icons */
}
@ -4384,7 +4453,7 @@ div.app:hover.app img, a:focus .app img {
line-height: 95%;
text-transform: lowercase;
border: none;
width: 120px;
width: 136px;
min-width: 72px;
background: #001000;
background-image: linear-gradient(to bottom, #001000, #001900 50%, #000 51%, #000);
@ -5657,8 +5726,8 @@ td.optionsave {
letter-spacing: -0.25em;
}
img.app, img.app2p {
padding: 14px 44px 40px;
.app img {
padding: 10px 50px 40px;
}
.applabel {
@ -5710,6 +5779,10 @@ div.app {
}
img.app, img.app2p {
}
.app img {
margin-top: -8px;
padding: 10px 58px 38px;
}
@ -5889,6 +5962,10 @@ div[id^="config_"] .tab:first-child {
padding: 5px 15px 15px !important;
}
.warning h3 {
margin: -4px -14px 10px;
}
.logo {
position: absolute;
top: 20px;

View File

@ -145,8 +145,13 @@ div.app {
width: 138px;
}
img.app, img.app2p {
.appimg {
padding: 5px 0 3px !important;
}
.app img {
margin-top: -6px !important;
padding: 10px 50px 40px !important;
}
.confignav {
@ -247,8 +252,3 @@ h3#webappconfig, h3#i2pclientconfig {
}
}
@media screen and (min-width: 1500px) {
img.app, img.app2p {
margin-top: -4px !important;
}
}

View File

@ -243,7 +243,7 @@ h3#helpfaq {
h3#helpfaq {
margin-bottom: -10px;
}
}
}
div.routersummary h4 {
border: none;
@ -608,10 +608,21 @@ div.warning {
.warning:not(old) {
background: url("/themes/console/images/itoopie_sm.png") no-repeat scroll 10px center, linear-gradient(to bottom, rgba(255,255,255,0.8), rgba(255,255,255,0.3)), url(images/noise.png) #fff;
background-size: 54px auto, 100% 100%, 50px 50px;
background-position: 10px calc(50% + 16px);
}
.warning h3 {
text-align: left;
margin: -9px -24px 20px !important;
border: none;
border-bottom: 1px solid #7789bf;
border-radius: 2px 2px 0 0;
padding: 10px 10px 8px;
font-size: 10.5pt;
}
#jumplinks {
margin-top: -15px;
}
#jumplinks h3 {
@ -673,6 +684,18 @@ div.warning {
}
}
@media screen and (min-width: 800px) {
.warning h3 {
margin: -9px -24px 20px -74px !important;
}
}
@media screen and (min-width: 1400px) {
#jumplinks h4 {
font-size: 10.5pt;
}
}
@media screen and (min-height: 700px) {
.proxyfooter {
position: absolute;
@ -703,6 +726,85 @@ div.warning {
}
}
.proxyfooter p {
text-align: right !important;
line-height: 115%;
color: #6b4612;
}
#proxyNewAddressHelper .warning {
padding-bottom: 5px !important;
}
#proxyNewHost {
margin-bottom: 20px;
}
#proxyNewHost td {
padding: 8px !important;
font-size: 10pt !important;
}
#proxyNewHost textarea {
white-space: pre-wrap;
word-break: break-all;
overflow: auto;
border: none;
resize: none;
background: none !important;
box-shadow: none !important;
width: 100% !important;
height: 6em;
margin: 0 !important;
padding: 0 !important;
}
#proxyNewHost textarea:focus {
filter: none;
}
#proxyNewHost + hr {
display: none;
}
#proxyNewHost a {
display: inline-block;
word-break: break-all;
}
#proxyNewHost td:first-child {
font-weight: bold;
}
.warning h4 {
box-shadow: none !important;
text-align: left;
font-size: 10pt;
margin-top: 20px;
text-transform: none;
letter-spacing: 0;
word-spacing: 0;
background: none;
border: none;
border-bottom: 1px solid #7778bf;
padding-left: 0;
margin-bottom: -5px;
}
#jumplinks h4 {
margin-bottom: 10px;
border-color: #113;
color: #333;
}
.warning p + .formaction {
margin: -5px -3px 10px 0;
padding: 0;
background: none !important;
border: none;
box-shadow: none;
}
/* end proxy error messages */
/* console error messages */

View File

@ -319,7 +319,7 @@ input[type="submit"]:active, input[type="reset"]:active, button:active {
box-shadow: inset 0 0 0 1px #000, inset 3px 3px 3px #000 !important;
}
input.accept, button.accept {
input.accept, button.accept, button[type="submit"] {
background: url(/themes/console/images/buttons/yes.png) 6px center no-repeat, linear-gradient(to bottom, #1f1e32, #090812 50%, #000 50%) !important;
background-size: 14px 14px, 100% 100% !important;
padding: 5px 7px 5px 23px !important;
@ -991,7 +991,7 @@ div.logo hr {
.logo a:link {
display: block;
padding: 2px;
padding: 4px;
}
.warning { /* proxy error messages */
@ -1002,10 +1002,11 @@ div.logo hr {
text-align: left;
color: #c9ceff;
text-align: justify;
background:url(/themes/console/images/itoopie_sm.png) 10px center no-repeat;
background: #000 url(/themes/console/images/itoopie_sm.png) 10px center no-repeat;
background-position: 10px calc(50% + 16px);
box-shadow: inset 0 0 0 1px #44175f;
word-wrap: break-word;
font-size: 9pt;
font-size: 10pt;
min-width: 300px;
box-shadow: inset 0 0 0 1px #44175f, inset 0 0 3px 3px #000, 0 0 0 2px #443da0;;
border: 5px solid #443da0;
@ -1016,15 +1017,17 @@ div.logo hr {
.warning p, .warning a {
font-size: 10pt
}
.warning a {
line-height: 150%;
line-height: 130%;
}
.warning h3 {
text-align: left;
padding: 5px 10px;
font-size: 10pt;
padding: 7px 10px;
text-align: left;
margin: -13px -24px 15px -74px;
border: none;
border-bottom: 1px solid #44175f;
}
#jumplinks a {
@ -1042,6 +1045,62 @@ div.logo hr {
line-height: 16px;
}
#proxyNewAddressHelper .warning {
padding-bottom: 0 !important;
}
#proxyNewHost {
margin-bottom: 30px;
}
#proxyNewHost td {
padding: 8px !important;
font-size: 10pt !important;
}
#proxyNewHost td:first-child {
font-weight: bold;
}
#proxyNewHost textarea {
white-space: pre-wrap;
word-break: break-all;
overflow: auto;
border: none;
resize: none;
background: none !important;
box-shadow: none !important;
width: 100% !important;
height: 6em;
margin: 0 !important;
padding: 0 !important;
}
#proxyNewHost textarea:focus {
filter: none;
}
#proxyNewHost + hr {
display: none;
}
.warning h4 {
box-shadow: none !important;
text-align: left;
font-size: 10pt;
padding-bottom: 7px;
}
#proxyNewHost a {
display: inline-block;
word-break: break-all;
}
.warning p + .formaction {
margin: 0 0 20px;
padding: 0;
}
.proxyfooter {
margin: 0 20px 10px 240px;
padding: 20px 25px 20px 75px;
@ -1062,6 +1121,11 @@ div.logo hr {
padding-left: 25px !important;
}
.warning h3 {
margin: -4px -14px 10px;
padding: 7px 10px 5px;
}
.logo {
display: none;
}
@ -1752,6 +1816,10 @@ div.confignav {
box-shadow: inset 0 0 0 1px #404;
}
.tab:hover a {
color: #652787 !important;
}
.tab:active {
box-shadow: inset 0 0 0 1px #000, inset 3px 3px 3px 1px #2d103f;
background: #652787 !important;
@ -4721,6 +4789,7 @@ table#jardump { /* /jars */
.main#webmail {
padding: 0;
background: #000 !important;
min-width: 736px;
}
.main#torrents, .main#tunnelmgr {
@ -4730,8 +4799,13 @@ table#jardump { /* /jars */
background-blend-mode: screen;
}
.main#torrents {
min-width: 640px;
}
.main#tunnelmgr {
padding: 0 5px;
min-width: 1000px;
}
#i2ptunnelframe {
@ -5048,7 +5122,7 @@ iframe.iframed {
.main#dns {
padding: 0;
min-width: 650px;
min-width: 640px;
background: #000 !important;
}
@ -6256,7 +6330,7 @@ div[id^="config_"] .tab:first-child {
.warning {
margin-left: 20px !important;
margin-top: 130px !important;
background: url(images/camotile2.png) !important;
background: #000 !important;
padding: 5px 15px 15px !important;
}

View File

@ -37,6 +37,10 @@ div.tunnels table {
width: 185px;
}
#sb_internals a, #sb_services a, #sb_advanced a {
font-size: 13pt !important;
}
#newsDisplay, #newsStatus {
font-size: 11pt !important;
}
@ -49,16 +53,17 @@ div.tunnels table {
width: 152px !important;
}
.ui_lang {
width: 156px !important;
.ui_lang, .themechoice {
width: 156px !important;
line-height: 140% !important;
}
.appimg {
height: 50px !important;
}
img.app, img.app2p {
padding-top: 12px !important;
.app img {
padding: 12px 60px 40px !important;
}
.applabel a, .applabel a:hover {
@ -66,7 +71,7 @@ img.app, img.app2p {
}
.applabel a, .applabel a:hover, .ui_lang, .themelabel {
font-size: 11pt !important;
font-size: 12pt !important;
}
.themechoice .optbox {
@ -86,7 +91,7 @@ label, select, select option, #configstats th b, .infohelp, .infowarn {
font-size: 11pt !important;
}
.messages li {
.messages li, code {
font-weight: normal !important;
font-size: 11pt;
}
@ -99,19 +104,43 @@ label, select, select option, #configstats th b, .infohelp, .infowarn {
margin-right: -4px !important;
}
.themechoice {
height: 82px !important;
div[lang="zh"], div[lang="zh"] a {
font-size: 11pt !important;
line-height: 150% !important;
letter-spacing: 0.05em;
word-spacing: 0.1em;
}
div[lang="zh"] p {
margin-left: 15px;
margin-right: 15px;
}
ul.links li {
text-align: justify;
}
/* global overrides */
@media screen and (min-width: 0) {
a, b, div.routersummary h3 a, div.routersummary h4 {
font-weight: normal !important;
font-size: 100%;
}
body {
font: 10pt Verdana, "Bitstream Vera Sans", Helvetica, Sans, sans-serif;
body, p, #news p {
font: 11pt "Noto Sans", Verdana, "Bitstream Vera Sans", Helvetica, Sans, sans-serif !important;
font-size-adjust: 0.6;
}
h2, h2 a[name], h3, h4.app, h4.app2 {
font-size: 14pt !important;
font-weight: normal !important;
letter-spacing: 0.1em !important;
}
h2, h2 a[name] {
font-size: 16pt !important;
}
div.main, div.main p, div.news p {
@ -134,6 +163,7 @@ input[type="submit"], input[type="reset"] {
font-size: 12pt !important;
font-weight: normal !important;
}
}
/* responsive layout */