From 0db637ed5af53ee32a3dd8ba337a8a15e059c402 Mon Sep 17 00:00:00 2001 From: str4d Date: Sat, 20 May 2017 08:09:30 +0000 Subject: [PATCH] Clarify choices on address helper save page (ticket #1940) --- .../i2p/i2ptunnel/I2PTunnelHTTPClient.java | 49 ++++++--- .../i2ptunnel/I2PTunnelHTTPClientBase.java | 4 +- apps/routerconsole/jsp/configadvanced.jsp | 2 +- history.txt | 1 + .../resources/proxy/ahelper-new-header.ht | 5 +- .../themes/console/classic/console.css | 98 +++++++++++++++-- .../resources/themes/console/dark/console.css | 101 +++++++++++++++-- .../themes/console/dark/console_big.css | 12 +- .../themes/console/light/console.css | 104 +++++++++++++++++- .../themes/console/midnight/console.css | 96 ++++++++++++++-- .../themes/console/midnight/console_big.css | 50 +++++++-- 11 files changed, 452 insertions(+), 70 deletions(-) diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java index aeb738b10..f3378be50 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java @@ -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("\n"); + out.write("
" + _t("Host") + - "" + destination + "
\n\n"); try { String b32 = Base32.encode(SHA256Generator.getInstance().calculateHash(Base64.decode(ahelperKey)).getData()); - out.write("" + + out.write("" + ""); } catch(Exception e) { } - out.write("
" + _t("Host") + + "" + destination + "
" + _t("Base 32") + "
" + _t("Base 32") + "" + b32 + ".b32.i2p
" + _t("Destination") + "" + - "
\n" + - "
" + + out.write("" + _t("Destination") + "" + + "" + + "\n\n" + "
\n" + + // FIXME if there is a query remaining it is lost - "
" + - "" + - "
\n
" + + "\n" + + "

" + _t("Continue to {0} without saving", destination) + "

\n

" + + _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.") + + "

\n
" + "\n
\n" + + + "
\n" + "\n" + "\n" + "\n" + - "
\n"); + + "

" + _t("Save {0} to Router address book and continue to website", destination) + "

\n

" + + _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("

\n
\n"); + if(_context.namingService().getName().equals("BlockfileNamingService")) { // only blockfile supports multiple books - out.write("

\n"); - out.write("\n"); + + out.write("

" + _t("Save {0} to Master address book and continue to website", destination) + "

\n

" + + _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.") + + "

\n
\n"); + + out.write("

" + _t("Save {0} to Private address book and continue to website", destination) + "

\n

" + + _t("This address will be saved to your Private address book, ensuring it is never published.") + + "

\n
\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("\n"); out.write("\n" + - "
"); + "\n\n"); writeFooter(out); } diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java index 5f4d28eb5..04da4c888 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java @@ -743,9 +743,9 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem if (first) { first = false; - out.write("

\n
\n

"); + out.write("

\n
\n

"); out.write(_t("Click a link below for an address helper from a jump service")); - out.write("

\n"); + out.write("

\n"); } else { out.write("
"); } diff --git a/apps/routerconsole/jsp/configadvanced.jsp b/apps/routerconsole/jsp/configadvanced.jsp index ed8a38885..a8724d834 100644 --- a/apps/routerconsole/jsp/configadvanced.jsp +++ b/apps/routerconsole/jsp/configadvanced.jsp @@ -70,7 +70,7 @@ <% } else { %> -<%=intl._t("To make changes, edit the file {0}.", "" + advancedhelper.getConfigFileName() + "")%> +<%=intl._t("To make changes, edit the file: {0}", "" + advancedhelper.getConfigFileName() + "")%> <% } // isAdvanced %> diff --git a/history.txt b/history.txt index 66fb8c516..02159a93d 100644 --- a/history.txt +++ b/history.txt @@ -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 diff --git a/installer/resources/proxy/ahelper-new-header.ht b/installer/resources/proxy/ahelper-new-header.ht index c21bd7892..413ef927a 100644 --- a/installer/resources/proxy/ahelper-new-header.ht +++ b/installer/resources/proxy/ahelper-new-header.ht @@ -6,12 +6,13 @@ Connection: close Proxy-Connection: close - + + _("Information: New Host Name") - +