Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Converts SiteInfo into redux component
Browse files Browse the repository at this point in the history
Resolves #9412

Auditors: @bsclifton @bridiver

Test Plan:
  • Loading branch information
NejcZdovc committed Jun 13, 2017
1 parent 7ce06ee commit 7a22995
Show file tree
Hide file tree
Showing 2 changed files with 198 additions and 188 deletions.
6 changes: 3 additions & 3 deletions app/renderer/components/main/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const cx = require('../../../../js/lib/classSet')
const eventUtil = require('../../../../js/lib/eventUtil')
const siteSettings = require('../../../../js/state/siteSettings')
const debounce = require('../../../../js/lib/debounce')
const {isSourceAboutUrl} = require('../../../../js/lib/appUrlUtil')
const {getCurrentWindowId, isMaximized, isFocused, isFullScreen} = require('../../currentWindow')
const {isDarwin, isWindows} = require('../../../common/lib/platformUtil')

Expand Down Expand Up @@ -687,7 +688,7 @@ class Main extends ImmutableComponent {
const btbMode = getSetting(settings.BOOKMARKS_TOOLBAR_MODE)
const showFavicon = (btbMode === bookmarksToolbarMode.TEXT_AND_FAVICONS || btbMode === bookmarksToolbarMode.FAVICONS_ONLY)
const showOnlyFavicon = btbMode === bookmarksToolbarMode.FAVICONS_ONLY
const siteInfoIsVisible = this.props.windowState.getIn(['ui', 'siteInfo', 'isVisible'])
const siteInfoIsVisible = this.props.windowState.getIn(['ui', 'siteInfo', 'isVisible']) && !isSourceAboutUrl(activeFrame.get('location'))
const braveryPanelIsVisible = shieldState.braveShieldsEnabled(activeFrame) &&
this.props.windowState.get('braveryPanelDetail')
const clearBrowsingDataPanelIsVisible = this.props.windowState.getIn(['ui', 'isClearBrowsingDataPanelVisible'])
Expand Down Expand Up @@ -737,8 +738,7 @@ class Main extends ImmutableComponent {
<Navigator />
{
siteInfoIsVisible
? <SiteInfo frameProps={activeFrame}
onHide={this.onHideSiteInfo} />
? <SiteInfo />
: null
}
{
Expand Down
Loading

0 comments on commit 7a22995

Please sign in to comment.