[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-115.3.1esr-13.0-1] fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in...



Title: GitLab

Pier Angelo Vendrame pushed to branch tor-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Tor Browser

Commits:

  • f14c6b11
    by Pier Angelo Vendrame at 2023-10-10T08:33:38+00:00
    fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection
    
    Bug 41912: Hide "Use Current Bridges" when we do not have any bridge
    strings.
    

2 changed files:

Changes:

  • browser/components/torpreferences/content/connectionPane.js
    ... ... @@ -99,6 +99,7 @@ const gConnectionPane = (function () {
    99 99
           currentHeader: "#torPreferences-currentBridges-header",
    
    100 100
           currentDescription: "#torPreferences-currentBridges-description",
    
    101 101
           currentDescriptionText: "#torPreferences-currentBridges-descriptionText",
    
    102
    +      controls: "#torPreferences-currentBridges-controls",
    
    102 103
           switch: "#torPreferences-currentBridges-switch",
    
    103 104
           cards: "#torPreferences-currentBridges-cards",
    
    104 105
           cardTemplate: "#torPreferences-bridgeCard-template",
    
    ... ... @@ -391,6 +392,7 @@ const gConnectionPane = (function () {
    391 392
             selectors.bridges.currentHeader
    
    392 393
           );
    
    393 394
           bridgeHeader.textContent = TorStrings.settings.bridgeCurrent;
    
    395
    +      const bridgeControls = prefpane.querySelector(selectors.bridges.controls);
    
    394 396
           const bridgeSwitch = prefpane.querySelector(selectors.bridges.switch);
    
    395 397
           bridgeSwitch.setAttribute("label", TorStrings.settings.allBridgesEnabled);
    
    396 398
           bridgeSwitch.addEventListener("toggle", () => {
    
    ... ... @@ -629,18 +631,17 @@ const gConnectionPane = (function () {
    629 631
     
    
    630 632
             const newStrings = new Set(TorSettings.bridges.bridge_strings);
    
    631 633
             const numBridges = newStrings.size;
    
    632
    -        if (!newStrings.size) {
    
    633
    -          bridgeHeader.hidden = true;
    
    634
    -          bridgeDescription.hidden = true;
    
    635
    -          bridgeCards.hidden = true;
    
    634
    +        const noBridges = !numBridges;
    
    635
    +        bridgeHeader.hidden = noBridges;
    
    636
    +        bridgeDescription.hidden = noBridges;
    
    637
    +        bridgeControls.hidden = noBridges;
    
    638
    +        bridgeCards.hidden = noBridges;
    
    639
    +        if (noBridges) {
    
    636 640
               showAll.hidden = true;
    
    637 641
               removeAll.hidden = true;
    
    638 642
               bridgeCards.textContent = "";
    
    639 643
               return;
    
    640 644
             }
    
    641
    -        bridgeHeader.hidden = false;
    
    642
    -        bridgeDescription.hidden = false;
    
    643
    -        bridgeCards.hidden = false;
    
    644 645
             // Changing the pressed property on moz-toggle should not trigger its
    
    645 646
             // "toggle" event.
    
    646 647
             bridgeSwitch.pressed = TorSettings.bridges.enabled;
    
    ... ... @@ -757,7 +758,7 @@ const gConnectionPane = (function () {
    757 758
               bridge = provider.currentBridge;
    
    758 759
             } catch (e) {
    
    759 760
               console.warn("Could not get current bridge", e);
    
    760
    -       }
    
    761
    +        }
    
    761 762
             if (bridge?.fingerprint !== this._currentBridgeId) {
    
    762 763
               this._currentBridgeId = bridge?.fingerprint ?? null;
    
    763 764
               this._updateConnectedBridges();
    

  • browser/components/torpreferences/content/connectionPane.xhtml
    ... ... @@ -107,7 +107,7 @@
    107 107
         <description flex="1" id="torPreferences-currentBridges-description">
    
    108 108
           <html:span id="torPreferences-currentBridges-descriptionText" />
    
    109 109
         </description>
    
    110
    -    <hbox align="center">
    
    110
    +    <hbox align="center" id="torPreferences-currentBridges-controls">
    
    111 111
           <html:moz-toggle
    
    112 112
             id="torPreferences-currentBridges-switch"
    
    113 113
             label-align-after=""
    

  • _______________________________________________
    tor-commits mailing list
    tor-commits@xxxxxxxxxxxxxxxxxxxx
    https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits