diff --git a/app/common/constants/bookmarksToolbarMode.js b/app/common/constants/bookmarksToolbarMode.js deleted file mode 100644 index 824cbfb7283..00000000000 --- a/app/common/constants/bookmarksToolbarMode.js +++ /dev/null @@ -1,11 +0,0 @@ -/* 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/common/constants/settingsEnums.js b/app/common/constants/settingsEnums.js new file mode 100644 index 00000000000..976f0cbc440 --- /dev/null +++ b/app/common/constants/settingsEnums.js @@ -0,0 +1,28 @@ +/* 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 startsWithOption = { + WINDOWS_TABS_FROM_LAST_TIME: 'lastTime', + HOMEPAGE: 'homePage', + NEW_TAB_PAGE: 'newTabPage' +} + +const newTabMode = { + BLANK: 'blank', + NEW_TAB_PAGE: 'newTabPage', + HOMEPAGE: 'homePage', + DEFAULT_SEARCH_ENGINE: 'defaultSearchEngine' +} + +const bookmarksToolbarMode = { + TEXT_ONLY: 'textOnly', + TEXT_AND_FAVICONS: 'textAndFavicons', + FAVICONS_ONLY: 'faviconsOnly' +} + +module.exports = { + startsWithOption, + newTabMode, + bookmarksToolbarMode +} diff --git a/app/extensions/brave/locales/en-US/preferences.properties b/app/extensions/brave/locales/en-US/preferences.properties index 249e8160504..9cfa00f3f6f 100644 --- a/app/extensions/brave/locales/en-US/preferences.properties +++ b/app/extensions/brave/locales/en-US/preferences.properties @@ -103,9 +103,12 @@ startsWith=Brave starts with startsWithOptionLastTime=my windows / tabs from last time startsWithOptionHomePage=my home page startsWithOptionNewTabPage=the new tab page -startsWithOptionDefaultSearchEngine=default search engine +newTabMode=A new tab shows +newTabBlank=blank +newTabNewTabPage=the new tab page +newTabHomePage=my home page +newTabDefaultSearchEngine=default search engine myHomepage=My homepage is -newTabMode=A new tab is default=Default searchEngine=Search Engine engineGoKey=Engine Go Key (Type First) diff --git a/docs/state.md b/docs/state.md index 798b0791a5c..398760dc178 100644 --- a/docs/state.md +++ b/docs/state.md @@ -161,7 +161,7 @@ AppStore // See defaults in js/constants/appConfig.js 'general.startup-mode': string, // One of: lastTime, homePage, newTabPage 'general.homepage': string, // URL of the user's homepage - 'general.newtab-mode': string, // One of: newTabPage, homePage, defaultSearchEngine + 'general.newtab-mode-TEMP': string, // One of: blank, newTabPage, homePage, defaultSearchEngine 'general.show-home-button': boolean, // true if the home button should be shown 'general.useragent.value': (undefined|string), // custom user agent value 'general.downloads.default-save-path': string, // default path for saving files diff --git a/js/about/preferences.js b/js/about/preferences.js index 8029df8cbd6..d7ccd4610c9 100644 --- a/js/about/preferences.js +++ b/js/about/preferences.js @@ -20,7 +20,8 @@ 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 {startsWithOption, newTabMode, bookmarksToolbarMode} = require('../../app/common/constants/settingsEnums') + const WidevineInfo = require('../../app/renderer/components/widevineInfo') const aboutActions = require('./aboutActions') const getSetting = require('../settings').getSetting @@ -646,9 +647,18 @@ class GeneralTab extends ImmutableComponent { + + + @@ -675,14 +685,6 @@ class GeneralTab extends ImmutableComponent { prefKey={settings.SHOW_BOOKMARKS_TOOLBAR} settings={this.props.settings} onChangeSetting={this.props.onChangeSetting} /> - - -