storj.io/minio@v0.0.0-20230509071714-0cbc90f649b1/browser/app/js/components/BrowserUpdate.js (about)

     1  /*
     2   * MinIO Cloud Storage (C) 2016 MinIO, Inc.
     3   *
     4   * Licensed under the Apache License, Version 2.0 (the "License");
     5   * you may not use this file except in compliance with the License.
     6   * You may obtain a copy of the License at
     7   *
     8   *     http://www.apache.org/licenses/LICENSE-2.0
     9   *
    10   * Unless required by applicable law or agreed to in writing, software
    11   * distributed under the License is distributed on an "AS IS" BASIS,
    12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   * See the License for the specific language governing permissions and
    14   * limitations under the License.
    15   */
    16  
    17  import React from 'react'
    18  import connect from 'react-redux/lib/components/connect'
    19  
    20  import Tooltip from 'react-bootstrap/lib/Tooltip'
    21  import OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger'
    22  
    23  let BrowserUpdate = ({latestUiVersion}) => {
    24    // Don't show an update if we're already updated!
    25    if (latestUiVersion === currentUiVersion) return ( <noscript></noscript> )
    26  
    27    return (
    28      <li className="hidden-xs hidden-sm">
    29        <a href="">
    30          <OverlayTrigger placement="left" overlay={ <Tooltip id="tt-version-update">
    31                                                       New update available. Click to refresh.
    32                                                     </Tooltip> }> <i className="fas fa-sync"></i> </OverlayTrigger>
    33        </a>
    34      </li>
    35    )
    36  }
    37  
    38  export default connect(state => {
    39    return {
    40      latestUiVersion: state.latestUiVersion
    41    }
    42  })(BrowserUpdate)