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

[tor-commits] [tor-browser] branch tor-browser-102.5.0esr-12.0-1 updated: fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser



This is an automated email from the git hooks/post-receive script.

richard pushed a commit to branch tor-browser-102.5.0esr-12.0-1
in repository tor-browser.

The following commit(s) were added to refs/heads/tor-browser-102.5.0esr-12.0-1 by this push:
     new a9bdc4fe2b15 fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser
a9bdc4fe2b15 is described below

commit a9bdc4fe2b1534c670b469c1b52fd8654dccf4eb
Author: Henry Wilkes <henry@xxxxxxxxxxxxxx>
AuthorDate: Thu Dec 1 15:54:34 2022 +0000

    fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser
    
    Convert the "View logs" <span> into a <button> and move the
    data-subcategory="viewlogs" attribute in about:preferences#connection
    one level below the "Advanced" groupbox.
---
 .../torconnect/content/aboutTorConnect.css         | 21 ++-----------------
 .../torconnect/content/aboutTorConnect.js          | 24 ++++++++++------------
 .../torconnect/content/aboutTorConnect.xhtml       |  4 +---
 .../torpreferences/content/connectionPane.xhtml    |  4 ++--
 4 files changed, 16 insertions(+), 37 deletions(-)

diff --git a/browser/components/torconnect/content/aboutTorConnect.css b/browser/components/torconnect/content/aboutTorConnect.css
index 688a11c4415d..03565940d7d2 100644
--- a/browser/components/torconnect/content/aboutTorConnect.css
+++ b/browser/components/torconnect/content/aboutTorConnect.css
@@ -281,25 +281,8 @@ input[type="checkbox"]:not(:disabled):active:checked {
 }
 
 /* mirrors p element spacing */
-#viewLogContainer {
-  margin:  1em 0;
-  height:  1.2em;
-  min-height:  1.2em;
-}
-
-#viewLogLink {
-  position:  relative;
-  display:  inline-block;
-  color:  var(--in-content-link-color);
-}
-
-/* hidden apparently only works if no display is set; who knew? */
-#viewLogLink[hidden="true"] {
-  display:  none;
-}
-
-#viewLogLink:hover {
-  cursor:pointer;
+#viewLogButton {
+  margin: 1em 0;
 }
 
 body {
diff --git a/browser/components/torconnect/content/aboutTorConnect.js b/browser/components/torconnect/content/aboutTorConnect.js
index 6b33442c7d02..7f127a02288a 100644
--- a/browser/components/torconnect/content/aboutTorConnect.js
+++ b/browser/components/torconnect/content/aboutTorConnect.js
@@ -53,8 +53,7 @@ class AboutTorConnect {
       },
     },
     viewLog: {
-      container: "#viewLogContainer",
-      link: "span#viewLogLink",
+      button: "#viewLogButton",
     },
     quickstart: {
       container: "div#quickstartContainer",
@@ -110,8 +109,7 @@ class AboutTorConnect {
     tryBridgeLabel: document.querySelector(
       this.selectors.breadcrumbs.tryBridge.label
     ),
-    viewLogContainer: document.querySelector(this.selectors.viewLog.container),
-    viewLogLink: document.querySelector(this.selectors.viewLog.link),
+    viewLogButton: document.querySelector(this.selectors.viewLog.button),
     quickstartContainer: document.querySelector(
       this.selectors.quickstart.container
     ),
@@ -448,7 +446,7 @@ class AboutTorConnect {
     this.setTitle(TorStrings.torConnect.torConnect, "");
     this.setLongText(TorStrings.settings.torPreferencesDescription);
     this.setProgress("", false);
-    this.hide(this.elements.viewLogContainer);
+    this.hide(this.elements.viewLogButton);
     this.hideButtons();
     this.show(this.elements.quickstartContainer);
     this.show(this.elements.configureButton);
@@ -511,9 +509,9 @@ class AboutTorConnect {
     }
     this.hideButtons();
     if (state.ShowViewLog) {
-      this.show(this.elements.viewLogContainer);
+      this.show(this.elements.viewLogButton);
     } else {
-      this.hide(this.elements.viewLogContainer);
+      this.hide(this.elements.viewLogButton);
     }
     this.show(this.elements.cancelButton, true);
     if (state.StateChanged) {
@@ -530,7 +528,7 @@ class AboutTorConnect {
       BreadcrumbStatus.Active,
       BreadcrumbStatus.Hidden
     );
-    this.show(this.elements.viewLogContainer);
+    this.show(this.elements.viewLogButton);
     this.hideButtons();
     this.show(this.elements.configureButton);
     this.show(this.elements.connectButton, true);
@@ -566,7 +564,7 @@ class AboutTorConnect {
       BreadcrumbStatus.Active,
       BreadcrumbStatus.Disabled
     );
-    this.show(this.elements.viewLogContainer);
+    this.show(this.elements.viewLogButton);
     this.showLocationForm(true, TorStrings.torConnect.tryBridge);
     if (state.StateChanged) {
       this.elements.tryBridgeButton.focus();
@@ -586,7 +584,7 @@ class AboutTorConnect {
       BreadcrumbStatus.Default,
       BreadcrumbStatus.Active
     );
-    this.show(this.elements.viewLogContainer);
+    this.show(this.elements.viewLogButton);
     this.showLocationForm(true, TorStrings.torConnect.tryAgain);
     if (state.StateChanged) {
       this.elements.tryBridgeButton.focus();
@@ -716,9 +714,9 @@ class AboutTorConnect {
     this.elements.tryBridgeLabel.textContent =
       TorStrings.torConnect.breadcrumbTryBridge;
 
-    this.hide(this.elements.viewLogContainer);
-    this.elements.viewLogLink.textContent = TorStrings.torConnect.viewLog;
-    this.elements.viewLogLink.addEventListener("click", event => {
+    this.hide(this.elements.viewLogButton);
+    this.elements.viewLogButton.textContent = TorStrings.torConnect.viewLog;
+    this.elements.viewLogButton.addEventListener("click", event => {
       RPMSendAsyncMessage("torconnect:view-tor-logs");
     });
 
diff --git a/browser/components/torconnect/content/aboutTorConnect.xhtml b/browser/components/torconnect/content/aboutTorConnect.xhtml
index 77d2e6889570..6c4d3b9df6de 100644
--- a/browser/components/torconnect/content/aboutTorConnect.xhtml
+++ b/browser/components/torconnect/content/aboutTorConnect.xhtml
@@ -39,9 +39,7 @@
           <p id="connectShortDescText" />
         </div>
 
-        <div id="viewLogContainer">
-          <span id="viewLogLink"></span>
-        </div>
+        <button id="viewLogButton"></button>
 
         <div id="quickstartContainer">
           <input id="quickstartCheckbox" type="checkbox" />
diff --git a/browser/components/torpreferences/content/connectionPane.xhtml b/browser/components/torpreferences/content/connectionPane.xhtml
index dded590fe0e7..47dbcb229978 100644
--- a/browser/components/torpreferences/content/connectionPane.xhtml
+++ b/browser/components/torpreferences/content/connectionPane.xhtml
@@ -167,9 +167,9 @@
     <button id="torPreferences-advanced-button"
             class="accessory-button"/>
   </hbox>
-  <hbox align="center">
+  <hbox align="center" data-subcategory="viewlogs">
     <label id="torPreferences-torLogs" flex="1"/>
-    <vbox data-subcategory="viewlogs">
+    <vbox>
       <button id="torPreferences-buttonTorLogs"
               class="accessory-button"/>
     </vbox>

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits