Commit 62bbac0a authored by henry's avatar henry Committed by morgan
Browse files

fixup! TB 31286: Implementation of bridge, proxy, and firewall settings in...

fixup! TB 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection

TB 45059: Add "Advanced" connection settings to the config.
parent 09269559
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -271,7 +271,7 @@ const CONFIG_PANES = Object.freeze({
  connection: {
    l10nId: "tor-connection-settings-pane",
    iconSrc: "chrome://browser/content/torconnect/tor-connect.svg",
    groupIds: ["connectionStatus", "torBridges"],
    groupIds: ["connectionStatus", "torBridges", "torAdvanced"],
    module: "chrome://browser/content/torpreferences/config/connection.mjs",
    visible: () => {
      return TorConnect.enabled;
+53 −0
Original line number Diff line number Diff line
@@ -192,6 +192,29 @@ SettingGroupManager.registerGroups({
      },
    ],
  },
  torAdvanced: {
    inProgress: true,
    l10nId: "tor-advanced-group",
    headingLevel: 2,
    items: [
      {
        id: "torAdvancedGroup",
        control: "moz-box-group",
        items: [
          {
            id: "torAdvancedConfigure",
            l10nId: "tor-advanced-configure-button",
            control: "moz-box-button",
          },
          {
            id: "torViewLog",
            l10nId: "tor-view-log-button2",
            control: "moz-box-button",
          },
        ],
      },
    ],
  },
});

Preferences.addSetting({
@@ -561,3 +584,33 @@ Preferences.addSetting({
    );
  },
});

Preferences.addSetting({
  id: "torAdvancedGroup",
});

Preferences.addSetting({
  id: "torAdvancedConfigure",
  deps: ["torSettingsReady"],
  visible({ torSettingsReady }) {
    // The dialog needs to be able to read TorSettings, so we keep this hidden
    // until it is ready.
    return torSettingsReady.value;
  },
  onUserClick() {
    window.gSubDialog.open(
      "chrome://browser/content/torpreferences/connectionSettingsDialog.xhtml",
      { features: "resizable=yes" }
    );
  },
});

Preferences.addSetting({
  id: "torViewLog",
  onUserClick() {
    window.gSubDialog.open(
      "chrome://browser/content/torpreferences/torLogDialog.xhtml",
      { features: "resizable=yes" }
    );
  },
});