Pier Angelo Vendrame pushed to branch tor-browser-102.8.0esr-12.5-1 at The Tor Project / Applications / Tor Browser
Commits: 0ee701d3 by Dan Ballard at 2023-03-10T09:24:17+00:00 fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection
bug 41093: add 'learn more' beside bridge emoji
- - - - - 1206e7d0 by Dan Ballard at 2023-03-10T09:24:17+00:00 fixup! Add TorStrings module for localization
bug 41093: add 'learn more' beside bridge emoji
- - - - - 6b8aa1af by Dan Ballard at 2023-03-10T09:24:17+00:00 fixup! fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection
bug 41093: fix css on 'what are these' links to not use .expanded but more precise :not syntax
- - - - -
5 changed files:
- browser/components/torpreferences/content/connectionPane.js - browser/components/torpreferences/content/connectionPane.xhtml - browser/components/torpreferences/content/torPreferences.css - browser/modules/TorStrings.jsm - toolkit/torbutton/chrome/locale/en-US/settings.properties
Changes:
===================================== browser/components/torpreferences/content/connectionPane.js ===================================== @@ -125,6 +125,7 @@ const gConnectionPane = (function() { cardTemplate: "#torPreferences-bridgeCard-template", card: ".torPreferences-bridgeCard", cardId: ".torPreferences-bridgeCard-id", + cardHeadingManualLink: ".torPreferences-bridgeCard-manualLink", cardHeadingAddr: ".torPreferences-bridgeCard-headingAddr", cardConnectedLabel: ".torPreferences-bridgeCard-connectedLabel", cardOptions: ".torPreferences-bridgeCard-options", @@ -458,6 +459,19 @@ const gConnectionPane = (function() { learnMore.setAttribute("useoriginprincipal", "true"); } } + { + const manualLink = bridgeTemplate.querySelector( + selectors.bridges.cardHeadingManualLink + ); + manualLink.setAttribute("value", TorStrings.settings.whatAreThese); + manualLink.setAttribute( + "href", + TorStrings.settings.learnMoreBridgesCardURL + ); + if (TorStrings.settings.learnMoreBridgesCardURL.startsWith("about:")) { + manualLink.setAttribute("useoriginprincipal", "true"); + } + } bridgeTemplate.querySelector( selectors.bridges.cardConnectedLabel ).textContent = TorStrings.settings.statusTorConnected;
===================================== browser/components/torpreferences/content/connectionPane.xhtml ===================================== @@ -106,6 +106,7 @@ <vbox id="torPreferences-bridgeCard-template" class="torPreferences-bridgeCard"> <hbox class="torPreferences-bridgeCard-heading"> <html:div class="torPreferences-bridgeCard-id"/> + <label class="torPreferences-bridgeCard-manualLink learnMore text-link stop-click" is="text-link"/> <html:div class="torPreferences-bridgeCard-headingAddr"/> <html:div class="torPreferences-bridgeCard-buttons"> <html:span class="torPreferences-bridgeCard-connectedBadge">
===================================== browser/components/torpreferences/content/torPreferences.css ===================================== @@ -260,6 +260,19 @@ html:dir(rtl) input[type="checkbox"].toggle-button::before { background: var(--in-content-box-background-odd); }
+#torPreferences-currentBridges-cards:not( + .single-card +) .torPreferences-bridgeCard:not( + .expanded, + .currently-connected +) .torPreferences-bridgeCard-manualLink { + display: none; +} + +.torPreferences-bridgeCard-manualLink { + margin: 0 8px; +} + .torPreferences-bridgeCard-headingAddr { /* flex extends the element when needed, but without setting a width (any) the overflow + ellipses does not work. */
===================================== browser/modules/TorStrings.jsm ===================================== @@ -86,6 +86,7 @@ const Loader = { statusTorNotConnected: "Not Connected", statusTorBlocked: "Potentially Blocked", learnMore: "Learn more", + whatAreThese: "What are these?", // Quickstart quickstartHeading: "Quickstart", quickstartDescription:
===================================== toolkit/torbutton/chrome/locale/en-US/settings.properties ===================================== @@ -40,6 +40,7 @@ settings.bridgeId=%1$S bridge: %2$S settings.remove=Remove settings.bridgeDisableBuiltIn=Disable built-in bridges settings.bridgeShare=Share this bridge using the QR code or by copying its address: +settings.whatAreThese=What are these? settings.bridgeCopy=Copy Bridge Address settings.copied=Copied! settings.bridgeShowAll=Show All Bridges
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/f72a9f9...