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

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



Title: GitLab

richard pushed to branch tor-browser-115.8.0esr-13.5-1 at The Tor Project / Applications / Tor Browser

Commits:

  • cab718d4
    by Henry Wilkes at 2024-02-22T16:50:41+00:00
    fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection
    
    Bug 42421: Hide the option to remove individual Lox bridges.
    
    We also adjust the "Remove all bridges" callback to simply set the
    "TorSettings.bridge.source" to be "Invalid" since this is more
    source-independent, and TorSettings will handle clearing the bridge
    strings for us.
    

1 changed file:

Changes:

  • browser/components/torpreferences/content/connectionPane.js
    ... ... @@ -730,11 +730,15 @@ const gBridgeGrid = {
    730 730
         const qrItem = row.menu.querySelector(
    
    731 731
           ".tor-bridges-options-qr-one-menu-item"
    
    732 732
         );
    
    733
    +    const removeItem = row.menu.querySelector(
    
    734
    +      ".tor-bridges-options-remove-one-menu-item"
    
    735
    +    );
    
    733 736
         row.menu.addEventListener("showing", () => {
    
    734
    -      qrItem.hidden = !(
    
    737
    +      const show =
    
    735 738
             this._bridgeSource === TorBridgeSource.UserProvided ||
    
    736
    -        this._bridgeSource === TorBridgeSource.BridgeDB
    
    737
    -      );
    
    739
    +        this._bridgeSource === TorBridgeSource.BridgeDB;
    
    740
    +      qrItem.hidden = !show;
    
    741
    +      removeItem.hidden = !show;
    
    738 742
         });
    
    739 743
     
    
    740 744
         qrItem.addEventListener("click", () => {
    
    ... ... @@ -752,21 +756,19 @@ const gBridgeGrid = {
    752 756
             ].getService(Ci.nsIClipboardHelper);
    
    753 757
             clipboard.copyString(row.bridgeLine);
    
    754 758
           });
    
    755
    -    row.menu
    
    756
    -      .querySelector(".tor-bridges-options-remove-one-menu-item")
    
    757
    -      .addEventListener("click", () => {
    
    758
    -        const bridgeLine = row.bridgeLine;
    
    759
    -        const strings = TorSettings.bridges.bridge_strings;
    
    760
    -        const index = strings.indexOf(bridgeLine);
    
    761
    -        if (index === -1) {
    
    762
    -          return;
    
    763
    -        }
    
    764
    -        strings.splice(index, 1);
    
    759
    +    removeItem.addEventListener("click", () => {
    
    760
    +      const bridgeLine = row.bridgeLine;
    
    761
    +      const strings = TorSettings.bridges.bridge_strings;
    
    762
    +      const index = strings.indexOf(bridgeLine);
    
    763
    +      if (index === -1) {
    
    764
    +        return;
    
    765
    +      }
    
    766
    +      strings.splice(index, 1);
    
    765 767
     
    
    766
    -        setTorSettings(() => {
    
    767
    -          TorSettings.bridges.bridge_strings = strings;
    
    768
    -        });
    
    768
    +      setTorSettings(() => {
    
    769
    +        TorSettings.bridges.bridge_strings = strings;
    
    769 770
           });
    
    771
    +    });
    
    770 772
       },
    
    771 773
     
    
    772 774
       /**
    
    ... ... @@ -2016,7 +2018,7 @@ const gBridgeSettings = {
    2016 2018
             setTorSettings(() => {
    
    2017 2019
               // This should always have the side effect of disabling bridges as
    
    2018 2020
               // well.
    
    2019
    -          TorSettings.bridges.bridge_strings = [];
    
    2021
    +          TorSettings.bridges.source = TorBridgeSource.Invalid;
    
    2020 2022
             });
    
    2021 2023
           });
    
    2022 2024
     
    

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