diff --git a/app/extensions/brave/img/newTabBackground/dksfoto1.jpg b/app/extensions/brave/img/newTabBackground/dksfoto1.jpg deleted file mode 100644 index 0fd89c60669..00000000000 Binary files a/app/extensions/brave/img/newTabBackground/dksfoto1.jpg and /dev/null differ diff --git a/app/extensions/brave/img/newTabBackground/dksfoto10.jpg b/app/extensions/brave/img/newTabBackground/dksfoto10.jpg deleted file mode 100644 index 1aa19b394e2..00000000000 Binary files a/app/extensions/brave/img/newTabBackground/dksfoto10.jpg and /dev/null differ diff --git a/app/extensions/brave/img/newTabBackground/dksfoto11.jpg b/app/extensions/brave/img/newTabBackground/dksfoto11.jpg deleted file mode 100644 index 6479221b918..00000000000 Binary files a/app/extensions/brave/img/newTabBackground/dksfoto11.jpg and /dev/null differ diff --git a/app/extensions/brave/img/newTabBackground/dksfoto2.jpg b/app/extensions/brave/img/newTabBackground/dksfoto2.jpg deleted file mode 100644 index e4729f350b0..00000000000 Binary files a/app/extensions/brave/img/newTabBackground/dksfoto2.jpg and /dev/null differ diff --git a/app/extensions/brave/img/newTabBackground/dksfoto3.jpg b/app/extensions/brave/img/newTabBackground/dksfoto3.jpg deleted file mode 100644 index 11a2a968982..00000000000 Binary files a/app/extensions/brave/img/newTabBackground/dksfoto3.jpg and /dev/null differ diff --git a/app/extensions/brave/img/newTabBackground/dksfoto5.jpg b/app/extensions/brave/img/newTabBackground/dksfoto5.jpg deleted file mode 100644 index ed534738839..00000000000 Binary files a/app/extensions/brave/img/newTabBackground/dksfoto5.jpg and /dev/null differ diff --git a/app/extensions/brave/img/newTabBackground/dksfoto6.jpg b/app/extensions/brave/img/newTabBackground/dksfoto6.jpg deleted file mode 100644 index 6a9e285f317..00000000000 Binary files a/app/extensions/brave/img/newTabBackground/dksfoto6.jpg and /dev/null differ diff --git a/app/extensions/brave/img/newTabBackground/dksfoto7.jpg b/app/extensions/brave/img/newTabBackground/dksfoto7.jpg deleted file mode 100644 index e46556c2237..00000000000 Binary files a/app/extensions/brave/img/newTabBackground/dksfoto7.jpg and /dev/null differ diff --git a/app/extensions/brave/img/newTabBackground/dksfoto8.jpg b/app/extensions/brave/img/newTabBackground/dksfoto8.jpg deleted file mode 100644 index 06dba575a8d..00000000000 Binary files a/app/extensions/brave/img/newTabBackground/dksfoto8.jpg and /dev/null differ diff --git a/app/extensions/brave/img/newTabBackground/dksfoto9.jpg b/app/extensions/brave/img/newTabBackground/dksfoto9.jpg deleted file mode 100644 index 38ce108af22..00000000000 Binary files a/app/extensions/brave/img/newTabBackground/dksfoto9.jpg and /dev/null differ diff --git a/app/extensions/brave/img/newTabBackground/dksfoto4.jpg b/app/extensions/brave/img/newtab_stock_image.jpg similarity index 100% rename from app/extensions/brave/img/newTabBackground/dksfoto4.jpg rename to app/extensions/brave/img/newtab_stock_image.jpg diff --git a/app/extensions/brave/locales/en-US/app.properties b/app/extensions/brave/locales/en-US/app.properties index a7308dbca17..abbd70bbaa9 100644 --- a/app/extensions/brave/locales/en-US/app.properties +++ b/app/extensions/brave/locales/en-US/app.properties @@ -1,6 +1,8 @@ reload=Reload addBookmark=Add bookmark +addBookmarkButton.title=Bookmark page removeBookmark=Remove bookmark +removeBookmarkButton.title=Remove bookmark addToReadingList=Add to reading list removeFromReadingList=Remove from reading list forward=Forward diff --git a/img/bookmarks_btn.svg b/img/bookmarks_btn.svg deleted file mode 100644 index 1f5268a2303..00000000000 --- a/img/bookmarks_btn.svg +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/img/history_btn.svg b/img/history_btn.svg deleted file mode 100644 index 850dc6fadf9..00000000000 --- a/img/history_btn.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - diff --git a/img/settings_prefs_btn.svg b/img/settings_prefs_btn.svg deleted file mode 100644 index fcc74d5820c..00000000000 --- a/img/settings_prefs_btn.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/img/topsites_btn_1.svg b/img/topsites_btn_1.svg deleted file mode 100644 index 559f29f4190..00000000000 --- a/img/topsites_btn_1.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - diff --git a/img/topsites_btn_2.svg b/img/topsites_btn_2.svg deleted file mode 100644 index d345fb02394..00000000000 --- a/img/topsites_btn_2.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - diff --git a/img/topsites_btn_3.svg b/img/topsites_btn_3.svg deleted file mode 100644 index 8cf855ec68b..00000000000 --- a/img/topsites_btn_3.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - diff --git a/js/about/aboutActions.js b/js/about/aboutActions.js index 24c682640b2..91a9cb96d1a 100644 --- a/js/about/aboutActions.js +++ b/js/about/aboutActions.js @@ -144,22 +144,6 @@ const aboutActions = { ipc.sendToHost(messages.CONTEXT_MENU_OPENED, nodeProps, contextMenuType) }, - /** - * Dispatches a message to set add/edit bookmark details - * If set, also indicates that add/edit is shown - * @param {Object} currentDetail - Properties of the bookmark to change to - * @param {Object} originalDetail - Properties of the bookmark to edit - * @param {Object} destinationDetail - Will move the added bookmark to the specified position - */ - setBookmarkDetail: function (currentDetail, originalDetail, destinationDetail) { - aboutActions.dispatchAction({ - actionType: windowConstants.WINDOW_SET_BOOKMARK_DETAIL, - currentDetail, - originalDetail, - destinationDetail - }) - }, - moveSite: function (sourceDetail, destinationDetail, prepend, destinationIsParent) { aboutActions.dispatchAction({ actionType: appConstants.APP_MOVE_SITE, @@ -355,6 +339,26 @@ const aboutActions = { }) }, + /** + * Dispatches a message to set add/edit bookmark details + * If set, also indicates that add/edit is shown + * @param {Object} currentDetail - Properties of the bookmark to change to + * @param {Object} originalDetail - Properties of the bookmark to edit + * @param {Object} destinationDetail - Will move the added bookmark to the specified position + * @param {boolean} shouldShowLocation - Whether or not to show the URL input + * @param {boolean} isBookmarkHanger - true if triggered from star icon in nav bar + */ + setBookmarkDetail: function (currentDetail, originalDetail, destinationDetail, shouldShowLocation, isBookmarkHanger) { + aboutActions.dispatchAction({ + actionType: windowConstants.WINDOW_SET_BOOKMARK_DETAIL, + currentDetail, + originalDetail, + destinationDetail, + shouldShowLocation, + isBookmarkHanger + }) + }, + /** * Dispatch a message to set default browser */ diff --git a/js/about/newTabComponents/block.js b/js/about/newTabComponents/block.js index 51e102c2400..ea913a4a935 100644 --- a/js/about/newTabComponents/block.js +++ b/js/about/newTabComponents/block.js @@ -3,6 +3,7 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ const React = require('react') +const ImmutableComponent = require('../../components/immutableComponent') const cx = require('../../lib/classSet.js') const DragSource = require('react-dnd').DragSource const DropTarget = require('react-dnd').DropTarget @@ -59,9 +60,9 @@ const targetCollect = (connect) => { } } -class Block extends React.Component { +class Block extends ImmutableComponent { render () { - const { isDragging, connectDragSource, connectDropTarget, onBookmarkedTopSite, isBookmarked, onPinnedTopSite, isPinned, onIgnoredTopSite, title, href, style, favicon } = this.props + const { isDragging, connectDragSource, connectDropTarget, onToggleBookmark, isBookmarked, onPinnedTopSite, isPinned, onIgnoredTopSite, title, href, style, favicon } = this.props const opacity = isDragging ? 0 : 1 const starIcon = isBookmarked ? 'fa-star' : 'fa-star-o' const pinIcon = isPinned ? 'fa-minus' : 'fa-thumb-tack' @@ -81,7 +82,7 @@ class Block extends React.Component { fa: true, [starIcon]: true })} - onClick={onBookmarkedTopSite} + onClick={onToggleBookmark} data-l10n-id={isBookmarked ? 'removeBookmarkButton' : 'addBookmarkButton'} />