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

[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-102.12.0esr-12.5-1] fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser



Title: GitLab

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

Commits:

  • ba957145
    by Henry Wilkes at 2023-06-14T15:40:56+01:00
    fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser
    
    Bug 41850: Don't show tor connection animation for new windows.
    

2 changed files:

Changes:

  • browser/components/torconnect/content/torConnectTitlebarStatus.css
    ... ... @@ -64,11 +64,11 @@
    64 64
     }
    
    65 65
     
    
    66 66
     @media (prefers-reduced-motion: no-preference) {
    
    67
    -  #tor-connect-titlebar-status.tor-connect-status-connected {
    
    67
    +  #tor-connect-titlebar-status.tor-connect-status-connected.tor-connect-status-animate-transition {
    
    68 68
         transition: color 1000ms;
    
    69 69
       }
    
    70 70
     
    
    71
    -  #tor-connect-titlebar-status.tor-connect-status-connected img {
    
    71
    +  #tor-connect-titlebar-status.tor-connect-status-connected.tor-connect-status-animate-transition img {
    
    72 72
         animation-name: onion-not-connected-to-connected;
    
    73 73
         animation-delay: 200ms;
    
    74 74
         animation-fill-mode: both;
    

  • browser/components/torconnect/content/torConnectTitlebarStatus.js
    ... ... @@ -16,6 +16,12 @@ var gTorConnectTitlebarStatus = {
    16 16
        * @type {Element}
    
    17 17
        */
    
    18 18
       label: null,
    
    19
    +  /**
    
    20
    +   * Whether we are connected, or null if the connection state is not yet known.
    
    21
    +   *
    
    22
    +   * @type {bool?}
    
    23
    +   */
    
    24
    +  connected: null,
    
    19 25
     
    
    20 26
       /**
    
    21 27
        * Initialize the component.
    
    ... ... @@ -84,7 +90,31 @@ var gTorConnectTitlebarStatus = {
    84 90
             break;
    
    85 91
         }
    
    86 92
         this.label.textContent = this._strings[textId];
    
    87
    -    this.node.classList.toggle("tor-connect-status-connected", connected);
    
    93
    +    if (this.connected !== connected) {
    
    94
    +      // When we are transitioning from
    
    95
    +      //   this.connected = false
    
    96
    +      // to
    
    97
    +      //   this.connected = true
    
    98
    +      // we want to animate the transition from the not connected state to the
    
    99
    +      // connected state (provided prefers-reduced-motion is not set).
    
    100
    +      //
    
    101
    +      // If instead we are transitioning directly from the initial state
    
    102
    +      //   this.connected = null
    
    103
    +      // to
    
    104
    +      //   this.connected = true
    
    105
    +      // we want to immediately show the connected state without any transition.
    
    106
    +      //
    
    107
    +      // In both cases, the status will eventually be hidden.
    
    108
    +      //
    
    109
    +      // We only expect this latter case when opening a new window after
    
    110
    +      // bootstrapping has already completed. See tor-browser#41850.
    
    111
    +      this.node.classList.toggle(
    
    112
    +        "tor-connect-status-animate-transition",
    
    113
    +        connected && this.connected !== null
    
    114
    +      );
    
    115
    +      this.node.classList.toggle("tor-connect-status-connected", connected);
    
    116
    +      this.connected = connected;
    
    117
    +    }
    
    88 118
         this.node.classList.toggle(
    
    89 119
           "tor-connect-status-potentially-blocked",
    
    90 120
           potentiallyBlocked
    

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