forked from brave/browser-laptop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactors Navigator and BrowserAction into redux components
Resovles brave#8651 Auditors: @bsclifton @bridiver Test Plan: - test if navigation buttons are working correctly - test if extension icon are displayed correctly and text is working for them
- Loading branch information
Showing
9 changed files
with
308 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
const appConfig = require('../../../js/constants/appConfig') | ||
const siteSettings = require('../../../js/state/siteSettings') | ||
|
||
const siteSettingsState = { | ||
const api = { | ||
getAllSiteSettings: (state, isPrivate) => { | ||
if (isPrivate) { | ||
return state.get('siteSettings').mergeDeep(state.get('temporarySiteSettings')) | ||
} | ||
return state.get('siteSettings') | ||
}, | ||
|
||
isNoScriptEnabled (state, settings) { | ||
isNoScriptEnabled (state, isPrivate) { | ||
const settings = api.getAllSiteSettings(state, isPrivate) | ||
return siteSettings.activeSettings(settings, state, appConfig).noScript === true | ||
} | ||
} | ||
|
||
module.exports = siteSettingsState | ||
module.exports = api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.