richard pushed to branch tor-browser-102.12.0esr-12.5-1 at The Tor Project / Applications / Tor Browser
Commits:
-
66f647aa
by Henry Wilkes at 2023-06-07T19:02:40+00:00
-
02ddc74a
by Henry Wilkes at 2023-06-07T19:02:40+00:00
9 changed files:
- − browser/components/torpreferences/content/check.svg
- browser/components/torpreferences/content/connectionPane.js
- browser/components/torpreferences/content/connectionPane.xhtml
- + browser/components/torpreferences/content/network-broken.svg
- browser/components/torpreferences/content/network.svg
- browser/components/torpreferences/content/torPreferences.css
- browser/components/torpreferences/jar.mn
- browser/modules/TorStrings.jsm
- toolkit/torbutton/chrome/locale/en-US/torConnect.properties
Changes:
1 | -<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2 | -<path d="M6.02301 13L1.18301 8.16099C1.07063 8.04262 1.00892 7.88505 1.01104 7.72185C1.01316 7.55865 1.07893 7.40273 1.19434 7.28732C1.30975 7.17191 1.46567 7.10613 1.62887 7.10402C1.79207 7.1019 1.94964 7.16361 2.06801 7.27599L6.37501 11.584L13.934 4.02299C14.0517 3.90617 14.2107 3.84061 14.3765 3.84061C14.5423 3.84061 14.7014 3.90617 14.819 4.02299C14.9358 4.14063 15.0014 4.29969 15.0014 4.46549C15.0014 4.63128 14.9358 4.79034 14.819 4.90799L6.72901 12.998L6.02301 13Z" fill="context-fill"/>
|
|
3 | -</svg> |
... | ... | @@ -80,25 +80,11 @@ const gConnectionPane = (function() { |
80 | 80 | category: {
|
81 | 81 | title: "label#torPreferences-labelCategory",
|
82 | 82 | },
|
83 | - messageBox: {
|
|
84 | - box: "div#torPreferences-connectMessageBox",
|
|
85 | - message: "td#torPreferences-connectMessageBox-message",
|
|
86 | - button: "button#torPreferences-connectMessageBox-button",
|
|
87 | - },
|
|
88 | 83 | torPreferences: {
|
89 | 84 | header: "h1#torPreferences-header",
|
90 | 85 | description: "span#torPreferences-description",
|
91 | 86 | learnMore: "label#torPreferences-learnMore",
|
92 | 87 | },
|
93 | - status: {
|
|
94 | - internetLabel: "#torPreferences-status-internet-label",
|
|
95 | - internetTest: "#torPreferences-status-internet-test",
|
|
96 | - internetIcon: "#torPreferences-status-internet-statusIcon",
|
|
97 | - internetStatus: "#torPreferences-status-internet-status",
|
|
98 | - torLabel: "#torPreferences-status-tor-label",
|
|
99 | - torIcon: "#torPreferences-status-tor-statusIcon",
|
|
100 | - torStatus: "#torPreferences-status-tor-status",
|
|
101 | - },
|
|
102 | 88 | quickstart: {
|
103 | 89 | header: "h2#torPreferences-quickstart-header",
|
104 | 90 | description: "span#torPreferences-quickstart-description",
|
... | ... | @@ -183,47 +169,6 @@ const gConnectionPane = (function() { |
183 | 169 | |
184 | 170 | const prefpane = document.getElementById("mainPrefPane");
|
185 | 171 | |
186 | - // 'Connect to Tor' Message Bar
|
|
187 | - |
|
188 | - const messageBox = prefpane.querySelector(selectors.messageBox.box);
|
|
189 | - const messageBoxMessage = prefpane.querySelector(
|
|
190 | - selectors.messageBox.message
|
|
191 | - );
|
|
192 | - const messageBoxButton = prefpane.querySelector(
|
|
193 | - selectors.messageBox.button
|
|
194 | - );
|
|
195 | - // wire up connect button
|
|
196 | - messageBoxButton.addEventListener("click", () => {
|
|
197 | - TorConnect.openTorConnect({ beginBootstrap: true });
|
|
198 | - });
|
|
199 | - |
|
200 | - this._populateMessagebox = () => {
|
|
201 | - if (TorConnect.canBeginBootstrap) {
|
|
202 | - // set messagebox style and text
|
|
203 | - if (TorConnect.hasEverFailed) {
|
|
204 | - messageBox.parentNode.style.display = null;
|
|
205 | - messageBox.className = "error";
|
|
206 | - messageBoxMessage.innerText = TorStrings.torConnect.tryAgainMessage;
|
|
207 | - messageBoxButton.innerText = TorStrings.torConnect.tryAgain;
|
|
208 | - } else {
|
|
209 | - messageBox.parentNode.style.display = null;
|
|
210 | - messageBox.className = "warning";
|
|
211 | - messageBoxMessage.innerText = TorStrings.torConnect.connectMessage;
|
|
212 | - messageBoxButton.innerText = TorStrings.torConnect.torConnectButton;
|
|
213 | - }
|
|
214 | - } else {
|
|
215 | - // we need to explicitly hide the groupbox, as switching between
|
|
216 | - // the tor pane and other panes will 'unhide' (via the 'hidden'
|
|
217 | - // attribute) the groupbox, offsetting all of the content down
|
|
218 | - // by the groupbox's margin (even if content is 0 height)
|
|
219 | - messageBox.parentNode.style.display = "none";
|
|
220 | - messageBox.className = "hidden";
|
|
221 | - messageBoxMessage.innerText = "";
|
|
222 | - messageBoxButton.innerText = "";
|
|
223 | - }
|
|
224 | - };
|
|
225 | - this._populateMessagebox();
|
|
226 | - |
|
227 | 172 | // Heading
|
228 | 173 | prefpane.querySelector(selectors.torPreferences.header).innerText =
|
229 | 174 | TorStrings.settings.categoryTitle;
|
... | ... | @@ -244,12 +189,16 @@ const gConnectionPane = (function() { |
244 | 189 | }
|
245 | 190 | |
246 | 191 | // Internet and Tor status
|
247 | - prefpane.querySelector(selectors.status.internetLabel).textContent =
|
|
192 | + const internetStatus = document.getElementById(
|
|
193 | + "torPreferences-status-internet"
|
|
194 | + );
|
|
195 | + internetStatus.querySelector(".torPreferences-status-name").textContent =
|
|
248 | 196 | TorStrings.settings.statusInternetLabel;
|
249 | - prefpane.querySelector(selectors.status.torLabel).textContent =
|
|
250 | - TorStrings.settings.statusTorLabel;
|
|
251 | - const internetTest = prefpane.querySelector(
|
|
252 | - selectors.status.internetTest
|
|
197 | + const internetResult = internetStatus.querySelector(
|
|
198 | + ".torPreferences-status-result"
|
|
199 | + );
|
|
200 | + const internetTest = document.getElementById(
|
|
201 | + "torPreferences-status-internet-test"
|
|
253 | 202 | );
|
254 | 203 | internetTest.setAttribute(
|
255 | 204 | "label",
|
... | ... | @@ -258,42 +207,65 @@ const gConnectionPane = (function() { |
258 | 207 | internetTest.addEventListener("command", () => {
|
259 | 208 | this.onInternetTest();
|
260 | 209 | });
|
261 | - const internetIcon = prefpane.querySelector(
|
|
262 | - selectors.status.internetIcon
|
|
210 | + |
|
211 | + const torConnectStatus = document.getElementById(
|
|
212 | + "torPreferences-status-tor-connect"
|
|
213 | + );
|
|
214 | + torConnectStatus.querySelector(
|
|
215 | + ".torPreferences-status-name"
|
|
216 | + ).textContent = TorStrings.settings.statusTorLabel;
|
|
217 | + const torConnectResult = torConnectStatus.querySelector(
|
|
218 | + ".torPreferences-status-result"
|
|
263 | 219 | );
|
264 | - const internetStatus = prefpane.querySelector(
|
|
265 | - selectors.status.internetStatus
|
|
220 | + const torConnectButton = document.getElementById(
|
|
221 | + "torPreferences-status-tor-connect-button"
|
|
266 | 222 | );
|
267 | - const torIcon = prefpane.querySelector(selectors.status.torIcon);
|
|
268 | - const torStatus = prefpane.querySelector(selectors.status.torStatus);
|
|
223 | + torConnectButton.setAttribute(
|
|
224 | + "label",
|
|
225 | + TorStrings.torConnect.torConnectButton
|
|
226 | + );
|
|
227 | + torConnectButton.addEventListener("command", () => {
|
|
228 | + TorConnect.openTorConnect({ beginBootstrap: true });
|
|
229 | + });
|
|
230 | + |
|
269 | 231 | this._populateStatus = () => {
|
270 | 232 | switch (this._internetStatus) {
|
271 | - case InternetStatus.Unknown:
|
|
272 | - internetTest.removeAttribute("hidden");
|
|
273 | - break;
|
|
274 | 233 | case InternetStatus.Online:
|
275 | - internetTest.setAttribute("hidden", "true");
|
|
276 | - internetIcon.className = "online";
|
|
277 | - internetStatus.textContent =
|
|
234 | + internetStatus.classList.remove("offline");
|
|
235 | + internetResult.textContent =
|
|
278 | 236 | TorStrings.settings.statusInternetOnline;
|
237 | + internetResult.hidden = false;
|
|
279 | 238 | break;
|
280 | 239 | case InternetStatus.Offline:
|
281 | - internetTest.setAttribute("hidden", "true");
|
|
282 | - internetIcon.className = "offline";
|
|
283 | - internetStatus.textContent =
|
|
240 | + internetStatus.classList.add("offline");
|
|
241 | + internetResult.textContent =
|
|
284 | 242 | TorStrings.settings.statusInternetOffline;
|
243 | + internetResult.hidden = false;
|
|
244 | + break;
|
|
245 | + case InternetStatus.Unknown:
|
|
246 | + default:
|
|
247 | + internetStatus.classList.remove("offline");
|
|
248 | + internetResult.hidden = true;
|
|
285 | 249 | break;
|
286 | 250 | }
|
287 | 251 | // FIXME: What about the TorConnectState.Disabled state?
|
288 | 252 | if (TorConnect.state === TorConnectState.Bootstrapped) {
|
289 | - torIcon.className = "connected";
|
|
290 | - torStatus.textContent = TorStrings.settings.statusTorConnected;
|
|
291 | - } else if (TorConnect.potentiallyBlocked) {
|
|
292 | - torIcon.className = "blocked";
|
|
293 | - torStatus.textContent = TorStrings.settings.statusTorBlocked;
|
|
253 | + torConnectStatus.classList.add("connected");
|
|
254 | + torConnectStatus.classList.remove("blocked");
|
|
255 | + torConnectResult.textContent = TorStrings.settings.statusTorConnected;
|
|
256 | + // NOTE: If the button is focused when we hide it, the focus may be
|
|
257 | + // lost. But we don't have an obvious place to put the focus instead.
|
|
258 | + torConnectButton.hidden = true;
|
|
294 | 259 | } else {
|
295 | - torIcon.className = "";
|
|
296 | - torStatus.textContent = TorStrings.settings.statusTorNotConnected;
|
|
260 | + torConnectStatus.classList.remove("connected");
|
|
261 | + torConnectStatus.classList.toggle(
|
|
262 | + "blocked",
|
|
263 | + TorConnect.potentiallyBlocked
|
|
264 | + );
|
|
265 | + torConnectResult.textContent = TorConnect.potentiallyBlocked
|
|
266 | + ? TorStrings.settings.statusTorBlocked
|
|
267 | + : TorStrings.settings.statusTorNotConnected;
|
|
268 | + torConnectButton.hidden = false;
|
|
297 | 269 | }
|
298 | 270 | };
|
299 | 271 | this._populateStatus();
|
... | ... | @@ -1046,7 +1018,6 @@ const gConnectionPane = (function() { |
1046 | 1018 | },
|
1047 | 1019 | |
1048 | 1020 | onStateChange() {
|
1049 | - this._populateMessagebox();
|
|
1050 | 1021 | this._populateStatus();
|
1051 | 1022 | this._showAutoconfiguration();
|
1052 | 1023 | this._populateBridgeCards();
|
... | ... | @@ -4,28 +4,6 @@ |
4 | 4 | src="">"chrome://browser/content/torpreferences/connectionPane.js"/>
|
5 | 5 | <html:template id="template-paneConnection">
|
6 | 6 | |
7 | -<!-- Tor Connect Message Box -->
|
|
8 | -<groupbox data-category="paneConnection" hidden="true">
|
|
9 | - <html:div id="torPreferences-connectMessageBox"
|
|
10 | - class="subcategory"
|
|
11 | - data-category="paneConnection"
|
|
12 | - hidden="true">
|
|
13 | - <html:table>
|
|
14 | - <html:tr>
|
|
15 | - <html:td>
|
|
16 | - <html:div id="torPreferences-connectMessageBox-icon"/>
|
|
17 | - </html:td>
|
|
18 | - <html:td id="torPreferences-connectMessageBox-message">
|
|
19 | - </html:td>
|
|
20 | - <html:td>
|
|
21 | - <html:button id="torPreferences-connectMessageBox-button">
|
|
22 | - </html:button>
|
|
23 | - </html:td>
|
|
24 | - </html:tr>
|
|
25 | - </html:table>
|
|
26 | - </html:div>
|
|
27 | -</groupbox>
|
|
28 | - |
|
29 | 7 | <hbox id="torPreferencesCategory"
|
30 | 8 | class="subcategory"
|
31 | 9 | data-category="paneConnection"
|
... | ... | @@ -45,15 +23,20 @@ |
45 | 23 | data-category="paneConnection"
|
46 | 24 | hidden="true">
|
47 | 25 | <hbox id="torPreferences-status-box">
|
48 | - <image id="torPreferences-status-internet-icon"/>
|
|
49 | - <html:span id="torPreferences-status-internet-label"/>
|
|
50 | - <button id="torPreferences-status-internet-test"/>
|
|
51 | - <image id="torPreferences-status-internet-statusIcon"/>
|
|
52 | - <html:span id="torPreferences-status-internet-status"/>
|
|
53 | - <image id="torPreferences-status-tor-icon"/>
|
|
54 | - <html:span id="torPreferences-status-tor-label"/>
|
|
55 | - <image id="torPreferences-status-tor-statusIcon"/>
|
|
56 | - <html:span id="torPreferences-status-tor-status"/>
|
|
26 | + <hbox id="torPreferences-status-internet"
|
|
27 | + class="torPreferences-status-grouping">
|
|
28 | + <image class="torPreferences-status-icon"/>
|
|
29 | + <html:span class="torPreferences-status-name"></html:span>
|
|
30 | + <html:span class="torPreferences-status-result"></html:span>
|
|
31 | + <button id="torPreferences-status-internet-test"/>
|
|
32 | + </hbox>
|
|
33 | + <hbox id="torPreferences-status-tor-connect"
|
|
34 | + class="torPreferences-status-grouping">
|
|
35 | + <image class="torPreferences-status-icon"/>
|
|
36 | + <html:span class="torPreferences-status-name"></html:span>
|
|
37 | + <html:span class="torPreferences-status-result"></html:span>
|
|
38 | + <button id="torPreferences-status-tor-connect-button"/>
|
|
39 | + </hbox>
|
|
57 | 40 | </hbox>
|
58 | 41 | </groupbox>
|
59 | 42 |
1 | +<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2 | +<rect width="18.6565" height="1.22295" rx="0.611475" transform="matrix(-0.707107 -0.707107 -0.707107 0.707107 14.9464 14.1921)" fill="context-fill"/>
|
|
3 | +<path fill-rule="evenodd" clip-rule="evenodd" d="M3.9498 1.68761C5.14904 0.918177 6.55296 0.5 8 0.5C9.98912 0.5 11.8968 1.29018 13.3033 2.6967C14.7098 4.10322 15.5 6.01088 15.5 8C15.5 9.44704 15.0818 10.851 14.3124 12.0502L13.3945 11.1323C13.8373 10.3656 14.1137 9.51118 14.202 8.625H11.973C11.9515 8.95148 11.9131 9.27556 11.8582 9.596L9.63719 7.375H10.719C10.573 5.44665 9.75105 3.63171 8.398 2.25H7.602C7.08087 2.78217 6.63852 3.37861 6.28323 4.02104L5.37173 3.10954C5.55124 2.81339 5.74752 2.52639 5.96 2.25H5.552C5.31395 2.35224 5.08325 2.46884 4.86107 2.59888L3.9498 1.68761ZM13.0242 4.30006C12.3637 3.39877 11.4738 2.69088 10.447 2.25H10.04C11.1778 3.72922 11.8509 5.51288 11.974 7.375H14.203C14.0918 6.26313 13.6848 5.20135 13.0242 4.30006Z" fill="context-fill"/>
|
|
4 | +<path fill-rule="evenodd" clip-rule="evenodd" d="M3.08673 2.33343C2.9529 2.44948 2.82278 2.57061 2.6967 2.6967C1.29018 4.10322 0.5 6.01088 0.5 8C0.5 9.98912 1.29018 11.8968 2.6967 13.3033C4.10322 14.7098 6.01088 15.5 8 15.5C9.98912 15.5 11.8968 14.7098 13.3033 13.3033C13.4294 13.1772 13.5505 13.0471 13.6666 12.9133L12.7733 12.02C12.1456 12.7694 11.3496 13.3627 10.448 13.75H10.039C10.7209 12.8639 11.2359 11.8685 11.5656 10.8123L10.5448 9.79147C10.2135 11.2778 9.47326 12.6509 8.397 13.75H7.602C6.24895 12.3683 5.427 10.5534 5.281 8.625H9.37831L8.12831 7.375H5.281C5.34173 6.57283 5.51944 5.79028 5.80369 5.05038L4.8504 4.09709C4.38292 5.12591 4.10162 6.23576 4.026 7.375H1.797C1.90802 6.2632 2.31487 5.20145 2.97523 4.30016C3.26721 3.90165 3.60404 3.54094 3.97771 3.22441L3.08673 2.33343ZM2.97497 11.7C3.63536 12.6014 4.52524 13.3092 5.552 13.75H5.96C4.82222 12.2708 4.14912 10.4871 4.026 8.625H1.797C1.90781 9.73686 2.31458 10.7987 2.97497 11.7Z" fill="context-fill"/>
|
|
5 | +</svg> |
1 | -<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
|
2 | - - License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3 | - - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
|
4 | -<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16" fill="context-fill" fill-opacity="context-fill-opacity">
|
|
5 | - <path d="M8.5 1a7.5 7.5 0 1 0 0 15 7.5 7.5 0 0 0 0-15zm2.447 1.75a6.255 6.255 0 0 1 3.756 5.125l-2.229 0A9.426 9.426 0 0 0 10.54 2.75l.407 0zm-2.049 0a8.211 8.211 0 0 1 2.321 5.125l-5.438 0A8.211 8.211 0 0 1 8.102 2.75l.796 0zm-2.846 0 .408 0a9.434 9.434 0 0 0-1.934 5.125l-2.229 0A6.254 6.254 0 0 1 6.052 2.75zm0 11.5a6.252 6.252 0 0 1-3.755-5.125l2.229 0A9.426 9.426 0 0 0 6.46 14.25l-.408 0zm2.05 0a8.211 8.211 0 0 1-2.321-5.125l5.437 0a8.211 8.211 0 0 1-2.321 5.125l-.795 0zm2.846 0-.409 0a9.418 9.418 0 0 0 1.934-5.125l2.229 0a6.253 6.253 0 0 1-3.754 5.125z"/>
|
|
1 | +<svg viewBox="0 0 16 16" width="16" height="16" xmlns="http://www.w3.org/2000/svg">
|
|
2 | + <path d="m 8,0.5 a 7.5,7.5 0 1 0 0,15 7.5,7.5 0 0 0 0,-15 z m 2.447,1.75 a 6.255,6.255 0 0 1 3.756,5.125 H 11.974 A 9.426,9.426 0 0 0 10.04,2.25 Z m -2.049,0 a 8.211,8.211 0 0 1 2.321,5.125 H 5.281 A 8.211,8.211 0 0 1 7.602,2.25 Z m -2.846,0 H 5.96 A 9.434,9.434 0 0 0 4.026,7.375 H 1.797 A 6.254,6.254 0 0 1 5.552,2.25 Z m 0,11.5 A 6.252,6.252 0 0 1 1.797,8.625 H 4.026 A 9.426,9.426 0 0 0 5.96,13.75 Z m 2.05,0 A 8.211,8.211 0 0 1 5.281,8.625 h 5.437 A 8.211,8.211 0 0 1 8.397,13.75 Z m 2.846,0 h -0.409 a 9.418,9.418 0 0 0 1.934,-5.125 h 2.229 a 6.253,6.253 0 0 1 -3.754,5.125 z" fill="context-fill" />
|
|
6 | 3 | </svg> |
... | ... | @@ -10,120 +10,25 @@ html:dir(rtl) input[type="checkbox"].toggle-button::before { |
10 | 10 | scale: -1;
|
11 | 11 | }
|
12 | 12 | |
13 | -/* Connect Message Box */
|
|
14 | - |
|
15 | -#torPreferences-connectMessageBox {
|
|
16 | - display: block;
|
|
17 | - position: relative;
|
|
18 | - |
|
19 | - width: auto;
|
|
20 | - min-height: 32px;
|
|
21 | - border-radius: 4px;
|
|
22 | - padding: 8px;
|
|
23 | -}
|
|
24 | - |
|
25 | -#torPreferences-connectMessageBox.hidden {
|
|
26 | - display: none;
|
|
27 | -}
|
|
28 | - |
|
29 | -#torPreferences-connectMessageBox.error {
|
|
30 | - background-color: var(--purple-50);
|
|
31 | - color: white;
|
|
32 | -}
|
|
33 | - |
|
34 | -#torPreferences-connectMessageBox.warning {
|
|
35 | - background-color: var(--purple-50);
|
|
36 | - color: white;
|
|
37 | -}
|
|
38 | - |
|
39 | -#torPreferences-connectMessageBox table {
|
|
40 | - border-collapse: collapse;
|
|
41 | -}
|
|
42 | - |
|
43 | -#torPreferences-connectMessageBox td {
|
|
44 | - vertical-align: middle;
|
|
45 | -}
|
|
46 | - |
|
47 | -#torPreferences-connectMessageBox td:first-child {
|
|
48 | - width: 16px;
|
|
49 | -}
|
|
50 | - |
|
51 | -#torPreferences-connectMessageBox-icon {
|
|
52 | - width: 16px;
|
|
53 | - height: 16px;
|
|
54 | - |
|
55 | - mask-repeat: no-repeat !important;
|
|
56 | - mask-size: 16px !important;
|
|
57 | -}
|
|
58 | - |
|
59 | -#torPreferences-connectMessageBox.error #torPreferences-connectMessageBox-icon
|
|
60 | -{
|
|
61 | - mask: url("chrome://browser/content/torconnect/tor-connect-broken.svg");
|
|
62 | - background-color: white;
|
|
63 | -}
|
|
64 | - |
|
65 | -#torPreferences-connectMessageBox.warning #torPreferences-connectMessageBox-icon
|
|
66 | -{
|
|
67 | - mask: url("chrome://browser/skin/onion.svg");
|
|
68 | - background-color: white;
|
|
69 | -}
|
|
13 | +/* Status */
|
|
70 | 14 | |
71 | -#torPreferences-connectMessageBox-message {
|
|
72 | - line-height: 16px;
|
|
73 | - padding-inline-start: 8px;
|
|
15 | +#torPreferences-status-box {
|
|
16 | + display: flex;
|
|
17 | + align-items: center;
|
|
18 | + gap: 32px;
|
|
74 | 19 | }
|
75 | 20 | |
76 | -#torPreferences-connectMessageBox-button {
|
|
77 | - display: block;
|
|
78 | - width: auto;
|
|
79 | - |
|
80 | - border-radius: 4px;
|
|
81 | - border: 0;
|
|
82 | - |
|
83 | - padding-inline: 18px;
|
|
84 | - padding-block: 8px;
|
|
85 | - margin-block: 0px;
|
|
86 | - margin-inline-start: 8px;
|
|
87 | - margin-inline-end: 0px;
|
|
88 | - |
|
89 | - font-size: 1.0em;
|
|
90 | - font-weight: 600;
|
|
21 | +.torPreferences-status-grouping {
|
|
22 | + display: flex;
|
|
23 | + align-items: center;
|
|
91 | 24 | white-space: nowrap;
|
92 | - |
|
93 | - color: white;
|
|
94 | -}
|
|
95 | - |
|
96 | -#torPreferences-connectMessageBox.error #torPreferences-connectMessageBox-button {
|
|
97 | - background-color: var(--purple-70);
|
|
98 | -}
|
|
99 | - |
|
100 | -#torPreferences-connectMessageBox.error #torPreferences-connectMessageBox-button:hover {
|
|
101 | - background-color: var(--purple-80);
|
|
102 | -}
|
|
103 | - |
|
104 | -#torPreferences-connectMessageBox.error #torPreferences-connectMessageBox-button:active {
|
|
105 | - background-color: var(--purple-90);
|
|
106 | -}
|
|
107 | - |
|
108 | -#torPreferences-connectMessageBox.warning #torPreferences-connectMessageBox-button {
|
|
109 | - background-color: var(--purple-70);
|
|
110 | -}
|
|
111 | - |
|
112 | -#torPreferences-connectMessageBox.warning #torPreferences-connectMessageBox-button:hover {
|
|
113 | - background-color: var(--purple-80);
|
|
114 | 25 | }
|
115 | 26 | |
116 | -#torPreferences-connectMessageBox.warning #torPreferences-connectMessageBox-button:active {
|
|
117 | - background-color: var(--purple-90);
|
|
118 | -}
|
|
119 | - |
|
120 | -/* Status */
|
|
121 | -#torPreferences-status-box {
|
|
122 | - display: flex;
|
|
123 | - align-items: center;
|
|
27 | +.torPreferences-status-grouping > * {
|
|
28 | + flex: 0 0 auto;
|
|
124 | 29 | }
|
125 | 30 | |
126 | -#torPreferences-status-internet-icon, #torPreferences-status-tor-icon {
|
|
31 | +.torPreferences-status-icon {
|
|
127 | 32 | width: 18px;
|
128 | 33 | height: 18px;
|
129 | 34 | margin-inline-end: 8px;
|
... | ... | @@ -131,51 +36,47 @@ html:dir(rtl) input[type="checkbox"].toggle-button::before { |
131 | 36 | fill: var(--in-content-text-color);
|
132 | 37 | }
|
133 | 38 | |
134 | -#torPreferences-status-internet-icon {
|
|
39 | +#torPreferences-status-internet .torPreferences-status-icon {
|
|
135 | 40 | list-style-image: url("chrome://browser/content/torpreferences/network.svg");
|
136 | 41 | }
|
137 | 42 | |
138 | -#torPreferences-status-tor-icon {
|
|
139 | - list-style-image: url("chrome://browser/skin/onion.svg");
|
|
43 | +#torPreferences-status-tor-connect .torPreferences-status-icon {
|
|
44 | + list-style-image: url("chrome://browser/content/torconnect/tor-connect-broken.svg");
|
|
140 | 45 | }
|
141 | 46 | |
142 | -#torPreferences-status-internet-label, #torPreferences-status-tor-label {
|
|
47 | +.torPreferences-status-name {
|
|
143 | 48 | font-weight: bold;
|
49 | + margin-inline-end: 0.75em;
|
|
144 | 50 | }
|
145 | 51 | |
146 | -#torPreferences-status-internet-status {
|
|
147 | - margin-inline-end: 32px;
|
|
148 | -}
|
|
149 | - |
|
150 | -#torPreferences-status-internet-statusIcon.online,
|
|
151 | -#torPreferences-status-internet-statusIcon.offline,
|
|
152 | -#torPreferences-status-tor-statusIcon {
|
|
153 | - margin-inline-start: 12px;
|
|
154 | - margin-inline-end: 9px;
|
|
52 | +.torPreferences-status-result {
|
|
53 | + margin-inline-end: 8px;
|
|
155 | 54 | }
|
156 | 55 | |
157 | -#torPreferences-status-internet-statusIcon, #torPreferences-status-tor-statusIcon {
|
|
158 | - -moz-context-properties: fill;
|
|
56 | +#torPreferences-status-internet.offline .torPreferences-status-icon {
|
|
57 | + list-style-image: url("chrome://browser/content/torpreferences/network-broken.svg");
|
|
159 | 58 | }
|
160 | 59 | |
161 | -#torPreferences-status-internet-statusIcon.online, #torPreferences-status-tor-statusIcon.connected {
|
|
162 | - list-style-image: url("chrome://browser/content/torpreferences/check.svg");
|
|
60 | +#torPreferences-status-tor-connect.connected .torPreferences-status-icon {
|
|
61 | + list-style-image: url("chrome://browser/content/torconnect/tor-connect.svg");
|
|
163 | 62 | fill: var(--purple-60);
|
164 | 63 | }
|
165 | 64 | |
166 | 65 | @media (prefers-color-scheme: dark) {
|
167 | - #torPreferences-status-internet-statusIcon.online, #torPreferences-status-tor-statusIcon.connected {
|
|
66 | + #torPreferences-status-tor-connect.connected .torPreferences-status-icon {
|
|
168 | 67 | fill: var(--purple-30);
|
169 | 68 | }
|
170 | 69 | }
|
171 | 70 | |
172 | -#torPreferences-status-internet-statusIcon.offline, #torPreferences-status-tor-statusIcon:not(.connected) {
|
|
173 | - list-style-image: url("chrome://global/skin/icons/warning.svg");
|
|
174 | - fill: var(--warning-color);
|
|
71 | +#torPreferences-status-tor-connect.blocked .torPreferences-status-icon {
|
|
72 | + /* Same as .tor-connect-status-potentially-blocked. */
|
|
73 | + fill: #c50042;
|
|
175 | 74 | }
|
176 | 75 | |
177 | -#torPreferences-status-tor-statusIcon.blocked {
|
|
178 | - fill: var(--in-content-danger-button-background);
|
|
76 | +@media (prefers-color-scheme: dark) {
|
|
77 | + #torPreferences-status-tor-connect.blocked .torPreferences-status-icon {
|
|
78 | + fill: #ff9aa2;
|
|
79 | + }
|
|
179 | 80 | }
|
180 | 81 | |
181 | 82 | /* Bridge settings */
|
... | ... | @@ -3,10 +3,10 @@ browser.jar: |
3 | 3 | content/browser/torpreferences/bridgeQrDialog.jsm (content/bridgeQrDialog.jsm)
|
4 | 4 | content/browser/torpreferences/builtinBridgeDialog.xhtml (content/builtinBridgeDialog.xhtml)
|
5 | 5 | content/browser/torpreferences/builtinBridgeDialog.jsm (content/builtinBridgeDialog.jsm)
|
6 | - content/browser/torpreferences/check.svg (content/check.svg)
|
|
7 | 6 | content/browser/torpreferences/connectionSettingsDialog.xhtml (content/connectionSettingsDialog.xhtml)
|
8 | 7 | content/browser/torpreferences/connectionSettingsDialog.jsm (content/connectionSettingsDialog.jsm)
|
9 | 8 | content/browser/torpreferences/network.svg (content/network.svg)
|
9 | + content/browser/torpreferences/network-broken.svg (content/network-broken.svg)
|
|
10 | 10 | content/browser/torpreferences/provideBridgeDialog.xhtml (content/provideBridgeDialog.xhtml)
|
11 | 11 | content/browser/torpreferences/provideBridgeDialog.jsm (content/provideBridgeDialog.jsm)
|
12 | 12 | content/browser/torpreferences/requestBridgeDialog.xhtml (content/requestBridgeDialog.xhtml)
|
... | ... | @@ -251,11 +251,6 @@ const Loader = { |
251 | 251 | |
252 | 252 | tryAgain: "Try Again",
|
253 | 253 | |
254 | - // tor connect strings for message box in about:preferences#connection
|
|
255 | - connectMessage:
|
|
256 | - "Changes to Tor Settings will not take effect until you connect",
|
|
257 | - tryAgainMessage:
|
|
258 | - "Tor Browser has failed to establish a connection to the Tor Network",
|
|
259 | 254 | yourLocation: "Your Location",
|
260 | 255 | unblockInternetIn: "Unblock the Internet in",
|
261 | 256 |
... | ... | @@ -40,8 +40,6 @@ torConnect.torConnectButton=Connect |
40 | 40 | torConnect.cancel=Cancel
|
41 | 41 | torConnect.torConnected=Connected to the Tor network!
|
42 | 42 | torConnect.tryAgain=Try Again
|
43 | -torConnect.connectMessage=Changes to Tor Settings will not take effect until you connect
|
|
44 | -torConnect.tryAgainMessage=Tor Browser has failed to establish a connection to the Tor Network
|
|
45 | 43 | torConnect.yourLocation=Your Location
|
46 | 44 | torConnect.unblockInternetIn=Unblock the Internet in
|
47 | 45 | torConnect.tryBridge=Try a Bridge
|
... | ... | @@ -59,3 +57,7 @@ torConnect.noSettingsForCountry=No settings available for your location |
59 | 57 | torConnect.torNotConnectedConcise=Not Connected
|
60 | 58 | torConnect.torConnectingConcise=Connecting…
|
61 | 59 | torConnect.torConnectedConcise=Connected
|
60 | + |
|
61 | +# connectMessage strings used up to 12.0 - TODO: remove when 12.5 becomes stable:
|
|
62 | +torConnect.tryAgainMessage=Tor Browser has failed to establish a connection to the Tor Network
|
|
63 | +torConnect.connectMessage=Changes to Tor Settings will not take effect until you connect |