From f62c748342febacb954ebb5386484889c0df80d8 Mon Sep 17 00:00:00 2001
From: idk <hankhill19580@gmail.com>
Date: Wed, 21 Apr 2021 21:56:45 -0400
Subject: [PATCH] Add a unicode arrow to the buttons on the address book
 interstitial. More CSS tweaks to work on more resolutions

---
 .../net/i2p/i2ptunnel/I2PTunnelHTTPClient.java    |  8 ++++----
 .../jsp/themes/console/dark/console.css           | 15 ++++-----------
 .../jsp/themes/console/light/console.css          | 15 ++++-----------
 3 files changed, 12 insertions(+), 26 deletions(-)

diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java
index 317dca7ec5..22a01c96be 100644
--- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java
+++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java
@@ -1455,7 +1455,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
                 // FIXME if there is a query remaining it is lost
                 "<form method=\"GET\" action=\"" + targetRequest + "\" class=\"hostaddform\">\n" +
                 "<div class=\"formaction hostaddaction\"><button type=\"submit\" class=\"go hostadd\">" +
-                "<h4>" + _t("Continue to {0} without saving", idn) + "</h4>\n<p>" +
+                "<span class=\"unicodeicon\">&#10143;</span><h4>" + _t("Continue to {0} without saving", idn) + "</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</button></div>" + "\n</form>\n" +
 
@@ -1467,7 +1467,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
         // FIXME wasn't escaped
         String label = _t("Save & continue").replace("&", "&amp;");
         out.write("<div class=\"formaction hostaddaction\"><button type=\"submit\" class=\"accept hostadd\" name=\"router\" value=\"router\">" +
-                "<h4>" + _t("Save {0} to router address book and continue to website", idn) + "</h4>\n<p>" +
+                "<span class=\"unicodeicon\">&#10143;</span><h4>" + _t("Save {0} to router address book and continue to website", idn) + "</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 Local or Private address book instead."));
@@ -1478,12 +1478,12 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
             // only blockfile supports multiple books
 
             out.write("<div class=\"formaction hostaddaction\"><button type=\"submit\" class=\"accept hostadd\" name=\"local\" value=\"local\">" +
-            "<h4>" + _t("Save {0} to local address book and continue to website", idn) + "</h4>\n<p>" +
+            "<span class=\"unicodeicon\">&#10143;</span><h4>" + _t("Save {0} to local address book and continue to website", idn) + "</h4>\n<p>" +
             _t("This address will be saved to your Local 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</button></div>\n");
 
             out.write("<div class=\"formaction hostaddaction\"><button type=\"submit\" class=\"accept hostadd\" name=\"private\" value=\"private\">" +
-            "<h4>" + _t("Save {0} to private address book and continue to website", idn) + "</h4>\n<p>" +
+            "<span class=\"unicodeicon\">&#10143;</span><h4>" + _t("Save {0} to private address book and continue to website", idn) + "</h4>\n<p>" +
             _t("This address will be saved to your Private address book, ensuring it is never published.") +
              "</p>\n</button></div>\n");
 
diff --git a/apps/routerconsole/jsp/themes/console/dark/console.css b/apps/routerconsole/jsp/themes/console/dark/console.css
index 6eaaa0f8cf..7a0573b2b5 100644
--- a/apps/routerconsole/jsp/themes/console/dark/console.css
+++ b/apps/routerconsole/jsp/themes/console/dark/console.css
@@ -270,20 +270,13 @@ div.warning {
 }
 
 .hostadd {
-     height: 25%;
+     min-height: 20%;
      width: 100%;
 }
 
-@media screen and (max-width: 1080px) {
-.hostadd {
-     height: 35%;
-}
-}
-
-@media screen and (max-width: 540px) {
-.hostadd {
-     height: 45%;
-}
+.unicodeicon {
+     font-size: 2rem;
+     vertical-align: middle;
 }
 
 .hostaddaction {
diff --git a/apps/routerconsole/jsp/themes/console/light/console.css b/apps/routerconsole/jsp/themes/console/light/console.css
index 7f35526b5d..fd744a8cef 100644
--- a/apps/routerconsole/jsp/themes/console/light/console.css
+++ b/apps/routerconsole/jsp/themes/console/light/console.css
@@ -1183,21 +1183,14 @@ p:empty + .sb_notice {
 }
 
 .hostadd {
-     height: 25%;
+     min-height: 20%;
      width: 100%;
      background: #fafaff !important;
 }
 
-@media screen and (max-width: 1080px) {
-.hostadd {
-     height: 35%;
-}
-}
-
-@media screen and (max-width: 540px) {
-.hostadd {
-     height: 45%;
-}
+.unicodeicon {
+     font-size: 2rem;
+     vertical-align: middle;
 }
 
 .hostaddaction {
-- 
GitLab