From 4eafa99d5a0f93184b674b099a49946f8846f766 Mon Sep 17 00:00:00 2001 From: Richard Pospesel Date: Mon, 15 Feb 2021 19:18:29 +0100 Subject: [PATCH] Bug 27476: misc about:torconnect fixes and polish - about:tor fix to prevent showing 'something went wrong page' after about:torconnect bootstrap - directly including tor-browser's onion-pattern xhtml/css rather than duplicating - about:tor polish: replaced png with svg icons for ddg (from ddg), mail and arrow (photon UI included from firefox) --- chrome/content/aboutTor/aboutTor.xhtml | 351 ++++++++------------------------- chrome/content/torbutton.js | 4 +- chrome/skin/aboutTor.css | 101 ++-------- chrome/skin/dax-logo.svg | 1 + chrome/skin/forwardArrow.png | Bin 258 -> 0 bytes chrome/skin/searchLogo.png | Bin 1912 -> 0 bytes jar.mn | 15 +- 7 files changed, 109 insertions(+), 363 deletions(-) rewrite chrome/content/aboutTor/aboutTor.xhtml (62%) create mode 100644 chrome/skin/dax-logo.svg delete mode 100644 chrome/skin/forwardArrow.png delete mode 100644 chrome/skin/searchLogo.png diff --git a/chrome/content/aboutTor/aboutTor.xhtml b/chrome/content/aboutTor/aboutTor.xhtml dissimilarity index 62% index 6c712a67..f3a9032f 100644 --- a/chrome/content/aboutTor/aboutTor.xhtml +++ b/chrome/content/aboutTor/aboutTor.xhtml @@ -1,268 +1,83 @@ - - - - - %htmlDTD; - - %globalDTD; - - %aboutTorDTD; - - %tbUpdateDTD; -]> - - - - - - &aboutTor.title; - - - - -
-
- - -
-
-
&aboutTor.ready.label;
-
-
&aboutTor.ready2.label;
-
-
-
&aboutTBUpdate.updated;
-
-
&aboutTBUpdate.linkPrefix;&aboutTBUpdate.linkLabel;&aboutTBUpdate.linkSuffix;
-
-
-
&aboutTor.failure.label;
-
-
&aboutTor.failure2.label;
-
-
- - - -
- - - -

&aboutTor.tor_mission.label; - &aboutTor.getInvolved.label;

-
-
- - -
-
-
- -
- -
-
-
-
-
- -
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
- -
-
-
-
-
-
- -
- -
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
- -
-
-
-
-
- -
- -
- -
-
-
-
-
- -
-
-
-
- -
- -
-
-
-
-
- -
- -
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
- -
-
-
-
-
- -
-
-
-
- -
-
-
- - + + + + + %htmlDTD; + + %globalDTD; + + %aboutTorDTD; + + %tbUpdateDTD; +]> + + + + + + &aboutTor.title; + + + + + +
+
+ + +
+
+
&aboutTor.ready.label;
+
+
&aboutTor.ready2.label;
+
+
+
&aboutTBUpdate.updated;
+
+
&aboutTBUpdate.linkPrefix;&aboutTBUpdate.linkLabel;&aboutTBUpdate.linkSuffix;
+
+
+
&aboutTor.failure.label;
+
+
&aboutTor.failure2.label;
+
+
+ + + +
+ + + +

&aboutTor.tor_mission.label; + &aboutTor.getInvolved.label;

+
+
+#include ../../../../../../browser/themes/shared/onionPattern.inc.xhtml + + diff --git a/chrome/content/torbutton.js b/chrome/content/torbutton.js index 39c1abeb..48539a96 100644 --- a/chrome/content/torbutton.js +++ b/chrome/content/torbutton.js @@ -934,8 +934,7 @@ function torbutton_do_tor_check() { let checkSvc = Cc["@torproject.org/torbutton-torCheckService;1"] .getService(Ci.nsISupports).wrappedJSObject; - if (checkSvc.kCheckNotInitiated != checkSvc.statusOfTorCheck || - m_tb_prefs.getBoolPref("extensions.torbutton.use_nontor_proxy") || + if (m_tb_prefs.getBoolPref("extensions.torbutton.use_nontor_proxy") || !m_tb_prefs.getBoolPref("extensions.torbutton.test_enabled")) return; // Only do the check once. @@ -1119,6 +1118,7 @@ function torbutton_initiate_remote_tor_check() { function torbutton_tor_check_ok() { + torbutton_do_tor_check(); let checkSvc = Cc["@torproject.org/torbutton-torCheckService;1"] .getService(Ci.nsISupports).wrappedJSObject; return (checkSvc.kCheckFailed != checkSvc.statusOfTorCheck); diff --git a/chrome/skin/aboutTor.css b/chrome/skin/aboutTor.css index 8d5c4a83..38486241 100644 --- a/chrome/skin/aboutTor.css +++ b/chrome/skin/aboutTor.css @@ -9,6 +9,9 @@ --abouttor-text-color: white; --abouttor-bg-toron-color: #420C5D; --abouttor-bg-toroff-color: #A4000F; + --onion-opacity: 0.2; + --onion-color: #fff; + --onion-radius: 50px; } * { @@ -23,6 +26,7 @@ html { body { display: flex; flex-direction: column; + justify-content: space-between; width: 100%; height: 100%; margin: 0px auto; @@ -159,7 +163,11 @@ body:not([showmanual]) .showForManual { } #bottom img.imageStyle { - padding-inline-end: 10px; + padding-inline-end: 0.5em; + height: 1.5em; + vertical-align: bottom; + -moz-context-properties: fill; + fill: white; } /* Hide the linebreaks on large enough screens (desktops, laptops, and @@ -195,7 +203,7 @@ body:not([showmanual]) .showForManual { height: auto; width: 50px; display: inline-block; - background: url('searchLogo.png') no-repeat center center; + background: url('dax-logo.svg') no-repeat center center; background-size: 30px 30px; } @@ -203,8 +211,8 @@ body:not([showmanual]) .showForManual { height: auto; width: 36px; border: 0; - background: url('forwardArrow.png') no-repeat center center; - background-size: 16px 14px; + background: url('chrome://browser/skin/forward.svg') no-repeat center center; + background-size: 16px 16px; cursor: pointer; } @@ -220,91 +228,6 @@ body:not([showmanual]) .showForManual { margin: 0; font-size: 15px; } - -.onion-pattern-container { - flex: auto; /* grow to consume remaining space on the page */ - display: flex; - flex-direction: column; - justify-content: end; /* position circles at the bottom */ - margin: 0px auto; - width: 100%; - max-width: 2200px; /* room for our 20 circles */ - min-height: 232px; /* room for 2 rows of circles */ - overflow-x: hidden; /* clip extra circles on the sides */ - direction: ltr; -} - -.onion-pattern-row { - width: 2200px; - display: flex; - flex-direction: row; - position: relative; -} - -.onion-pattern-offset-row { - left: -40px; -} - -/* With borders, circles range in size from 100 x 100px to 116 x 116px. */ -.circle { - opacity: 0.2; - position: relative; - width: 100px; - height: 100px; - border-radius: 50%; -} - -.inner { - position: absolute; -} - -.inner:nth-child(1){ - transform: translate(calc(12.5% - 2px),calc(12.5% - 2px)); - width: calc(100% * 0.75); - height: calc(100% * 0.75); - border-radius: 50%; -} - -.inner:nth-child(2){ - transform: translate(calc(40% - 2px),calc(40% - 2px)); - width: calc(100% * 0.5); - height: calc(100% * 0.5); - border-radius: 50%; -} - -.inner:nth-child(3){ - transform: translate(calc(108% - 2px),calc(108% - 2px)); - width: calc(100% * 0.25); - height: calc(100% * 0.25); - border-radius: 50%; -} - -.solid { - background-color: #fff; -} - -.border { - border: 4px solid #fff; -} - -.dashed { - border: 4px dashed #fff; -} - -.dotted { - border: 4px dotted #fff; -} - -.bold { - border: 8px solid #fff; -} - -.half { - width: 100px; - height: 50px; - border-radius: 50px 50px 0 0; -} - /* * Mobile specific css */ diff --git a/chrome/skin/dax-logo.svg b/chrome/skin/dax-logo.svg new file mode 100644 index 00000000..94ad7c35 --- /dev/null +++ b/chrome/skin/dax-logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/chrome/skin/forwardArrow.png b/chrome/skin/forwardArrow.png deleted file mode 100644 index ceea950fe52e1a936b79bc4207e29bffe9296d01..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcwPel00001 literal 258 zcwXxa@N?(olHy`uVBq!ia0vp^0zk~i!3HGN^yhQ|DVB6cUq=Rpjs4tz5?O)#ot`d^ zAsV8|2?`7qm6g>E6@2#g`xVTV`rKf-c!Z^)ruqN>|L2dSaX2#1m@&gkQd06gBX7W= zG!Elgxe|Bg+t>el@ZiA><|!K(C7BjE)=aSQFmz;g==vaeh$F~BhoP16gtWr+hCQrD zUiQ?~)Ce~+T{|MxwCtVIK?j%14F{Lr;g)cFByix_|9*Mx|u9-I@;s^7U0$GvgFJ?KiF*3|@FEE)lV`etc6AYfNelF{r G5}E+tVqe+- diff --git a/chrome/skin/searchLogo.png b/chrome/skin/searchLogo.png deleted file mode 100644 index 98ae319eb4c3579813b6e0acc3291edb6269bd60..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcwPel00001 literal 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