diff --git a/app/common/constants/bookmarksToolbarMode.js b/app/common/constants/bookmarksToolbarMode.js new file mode 100644 index 00000000000..824cbfb7283 --- /dev/null +++ b/app/common/constants/bookmarksToolbarMode.js @@ -0,0 +1,11 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +const settings = { + TEXT_ONLY: 'textOnly', + TEXT_AND_FAVICONS: 'textAndFavicons', + FAVICONS_ONLY: 'faviconsOnly' +} + +module.exports = settings diff --git a/app/extensions/brave/locales/en-US/preferences.properties b/app/extensions/brave/locales/en-US/preferences.properties index a8b39adf7d6..6bca8a185a8 100644 --- a/app/extensions/brave/locales/en-US/preferences.properties +++ b/app/extensions/brave/locales/en-US/preferences.properties @@ -153,7 +153,7 @@ managePasswords=Manage passwords… sitePermissions=Saved Site Permissions sitePermissionsExceptions=Saved Site Exceptions selectedLanguage=Language: -bookmarkToolbarSettings=Bookmarks Bar Settings +bookmarkToolbarSettings=Bookmarks Bar bookmarkToolbar=Always show the bookmarks bar bookmarkToolbarShowFavicon=Favicons bookmarkToolbarShowOnlyFavicon=Show only favicon @@ -220,7 +220,6 @@ allowUntilRestart=Allow until restart flashAllowAlways=Allow until {{time}} alwaysAllow=Always allow alwaysDeny=Always deny -appearanceSettings=Appearance Settings autoHideMenuBar=Hide the menu bar by default disableTitleMode=Always show the URL bar tabsSettings=Tabs Settings @@ -247,3 +246,6 @@ importNow=Import now… clearAll=Clear all sendCrashReports=Send anonymous crash reports to Brave (requires browser restart) sendUsageStatistics=Automatically send usage statistics to Brave +bookmarksBarTextOnly=Text only +bookmarksBarTextAndFavicon=Text and Favicons +bookmarksBarFaviconOnly=Favicons only diff --git a/js/about/aboutActions.js b/js/about/aboutActions.js index d2a818c863b..5702f55b1c4 100644 --- a/js/about/aboutActions.js +++ b/js/about/aboutActions.js @@ -210,7 +210,7 @@ const aboutActions = { ipc.sendToHost(messages.CLEAR_BROWSING_DATA_NOW, clearBrowsingDataDetail) }, - importBrowerDataNow: function () { + importBrowserDataNow: function () { ipc.send(messages.IMPORT_BROWSER_DATA_NOW) }, diff --git a/js/about/preferences.js b/js/about/preferences.js index 53318929169..daab6c2f1f9 100644 --- a/js/about/preferences.js +++ b/js/about/preferences.js @@ -20,6 +20,7 @@ const messages = require('../constants/messages') const settings = require('../constants/settings') const coinbaseCountries = require('../constants/coinbaseCountries') const {passwordManagers, extensionIds} = require('../constants/passwordManagers') +const bookmarksToolbarMode = require('../../app/common/constants/bookmarksToolbarMode') const aboutActions = require('./aboutActions') const getSetting = require('../settings').getSetting const SortableTable = require('../components/sortableTable') @@ -138,7 +139,14 @@ class SettingCheckbox extends ImmutableComponent { } render () { - return
+ const props = { + style: this.props.style, + className: 'settingItem' + } + if (this.props.id) { + props.id = this.props.id + } + return
) }) + const homepageValue = getSetting(settings.HOMEPAGE, this.props.settings) + const homepage = homepageValue && homepageValue.trim() + const disableShowHomeButton = !homepage || !homepage.length + const disableBookmarksBarSelect = !getSetting(settings.SHOW_BOOKMARKS_TOOLBAR, this.props.settings) const defaultLanguage = this.props.languageCodes.find((lang) => lang.includes(navigator.language)) || 'en-US' + return
@@ -604,7 +629,26 @@ class GeneralTab extends ImmutableComponent { + onChange={changeSetting.bind(null, this.onChangeSetting, settings.HOMEPAGE)} /> + + + { + isDarwin ? null : + } + + + +