From 33e1054f9042588431248dcb4017e463f6ff64d5 Mon Sep 17 00:00:00 2001 From: Ryan Lanese Date: Thu, 10 Jan 2019 04:54:55 -0700 Subject: [PATCH] Fixes brave-browser/issues#2846, updates ads disabled content --- browser/ui/webui/brave_webui_source.cc | 6 ++---- .../resources/brave_rewards_static_resources.grd | 3 --- components/brave_rewards/resources/img/ads_disabled.svg | 1 - .../brave_rewards/resources/img/contribute_disabled.svg | 1 - components/brave_rewards/resources/img/donate_disabled.svg | 1 - .../brave_rewards/resources/ui/components/adsBox.tsx | 7 ++----- .../resources/ui/components/contributeBox.tsx | 4 ---- .../brave_rewards/resources/ui/components/donationsBox.tsx | 4 ---- components/resources/brave_components_strings.grd | 3 ++- package-lock.json | 4 ++-- package.json | 2 +- 11 files changed, 9 insertions(+), 27 deletions(-) delete mode 100644 components/brave_rewards/resources/img/ads_disabled.svg delete mode 100644 components/brave_rewards/resources/img/contribute_disabled.svg delete mode 100644 components/brave_rewards/resources/img/donate_disabled.svg diff --git a/browser/ui/webui/brave_webui_source.cc b/browser/ui/webui/brave_webui_source.cc index 3ed14dbdeff7..9ad40d7a5793 100644 --- a/browser/ui/webui/brave_webui_source.cc +++ b/browser/ui/webui/brave_webui_source.cc @@ -80,9 +80,6 @@ void CustomizeWebUIHTMLSource(const std::string &name, content::WebUIDataSource* }, { std::string("rewards"), { { "favicon.ico", IDR_BRAVE_REWARDS_FAVICON }, - { "878e89ddb547d70019456c4792ce1a23.svg", IDR_BRAVE_REWARDS_IMG_ADS_DISABLED }, - { "6517b078dcd47a8540230a5453d53927.svg", IDR_BRAVE_REWARDS_IMG_CONTRIBUTE_DISABLED }, - { "21bfb482964742768c5020312af36224.svg", IDR_BRAVE_REWARDS_IMG_DONATE_DISABLED }, { "4fcfa7f92c5fc22c2b6f34701bfdcd0a.jpeg", IDR_BRAVE_REWARDS_IMG_BART_TEMP }, { "6dd79d472f9c73429b26dae4ef14575e.svg", IDR_BRAVE_REWARDS_IMG_WALLET_BG }, { "c9255cc2aa3d81ca6328e82d25a95766.png", IDR_BRAVE_REWARDS_IMG_CAPTCHA_BAT }, @@ -194,7 +191,8 @@ void CustomizeWebUIHTMLSource(const std::string &name, content::WebUIDataSource* std::string("rewards"), { { "adsCurrentEarnings", IDS_BRAVE_REWARDS_LOCAL_ADS_CURRENT_EARNINGS }, { "adsDesc", IDS_BRAVE_REWARDS_LOCAL_ADS_DESC }, - { "adsDisabledText", IDS_BRAVE_REWARDS_LOCAL_ADS_DISABLED_TEXT }, + { "adsDisabledTextOne", IDS_BRAVE_REWARDS_LOCAL_ADS_DISABLED_TEXT_ONE }, + { "adsDisabledTextTwo", IDS_BRAVE_REWARDS_LOCAL_ADS_DISABLED_TEXT_TWO }, { "adsNotificationsReceived", IDS_BRAVE_REWARDS_LOCAL_ADS_NOTIFICATIONS_RECEIVED }, { "adsPaymentDate", IDS_BRAVE_REWARDS_LOCAL_ADS_PAYMENT_DATE }, { "adsPagesViewed", IDS_BRAVE_REWARDS_LOCAL_ADS_PAGES_VIEWED }, diff --git a/components/brave_rewards/resources/brave_rewards_static_resources.grd b/components/brave_rewards/resources/brave_rewards_static_resources.grd index 07f1ba57a11f..b0dc7b78b683 100644 --- a/components/brave_rewards/resources/brave_rewards_static_resources.grd +++ b/components/brave_rewards/resources/brave_rewards_static_resources.grd @@ -10,9 +10,6 @@ - - - diff --git a/components/brave_rewards/resources/img/ads_disabled.svg b/components/brave_rewards/resources/img/ads_disabled.svg deleted file mode 100644 index 8a832ffd3f91..000000000000 --- a/components/brave_rewards/resources/img/ads_disabled.svg +++ /dev/null @@ -1 +0,0 @@ -Ads diff --git a/components/brave_rewards/resources/img/contribute_disabled.svg b/components/brave_rewards/resources/img/contribute_disabled.svg deleted file mode 100644 index fe5b4d0b5739..000000000000 --- a/components/brave_rewards/resources/img/contribute_disabled.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/components/brave_rewards/resources/img/donate_disabled.svg b/components/brave_rewards/resources/img/donate_disabled.svg deleted file mode 100644 index a90b2a8545f8..000000000000 --- a/components/brave_rewards/resources/img/donate_disabled.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/components/brave_rewards/resources/ui/components/adsBox.tsx b/components/brave_rewards/resources/ui/components/adsBox.tsx index bd7f98be0a88..90048685a69c 100644 --- a/components/brave_rewards/resources/ui/components/adsBox.tsx +++ b/components/brave_rewards/resources/ui/components/adsBox.tsx @@ -17,9 +17,6 @@ import { Grid, Column, Select, ControlWrapper } from 'brave-ui/components' import { getLocale } from '../../../../common/locale' import * as rewardsActions from '../actions/rewards_actions' -// Assets -const adsDisabledIcon = require('../../img/ads_disabled.svg') - interface Props extends Rewards.ComponentProps { } @@ -38,10 +35,10 @@ class AdsBox extends React.Component { adsDisabled = () => { return ( -

{getLocale('adsDisabledText')}

+ • {getLocale('adsDisabledTextOne')}
+ • {getLocale('adsDisabledTextTwo')}
) } diff --git a/components/brave_rewards/resources/ui/components/contributeBox.tsx b/components/brave_rewards/resources/ui/components/contributeBox.tsx index 054083bc7ea0..b4234c133504 100644 --- a/components/brave_rewards/resources/ui/components/contributeBox.tsx +++ b/components/brave_rewards/resources/ui/components/contributeBox.tsx @@ -16,9 +16,6 @@ import { getLocale } from '../../../../common/locale' import * as rewardsActions from '../actions/rewards_actions' import * as utils from '../utils' -// Assets -const contributeDisabledIcon = require('../../img/contribute_disabled.svg') - interface State { modalContribute: boolean settings: boolean @@ -69,7 +66,6 @@ class ContributeBox extends React.Component { contributeDisabled () { return ( • {getLocale('contributionDisabledText1')}
diff --git a/components/brave_rewards/resources/ui/components/donationsBox.tsx b/components/brave_rewards/resources/ui/components/donationsBox.tsx index cfd9d4b7c5eb..c6be59d395f1 100644 --- a/components/brave_rewards/resources/ui/components/donationsBox.tsx +++ b/components/brave_rewards/resources/ui/components/donationsBox.tsx @@ -24,9 +24,6 @@ import * as rewardsActions from '../actions/rewards_actions' import * as utils from '../utils' import { DetailRow } from 'brave-ui/features/rewards/tableDonation' -// Assets -const donate = require('../../img/donate_disabled.svg') - interface Props extends Rewards.ComponentProps { } @@ -51,7 +48,6 @@ class DonationBox extends React.Component { disabledContent = () => { return ( • {getLocale('donationDisabledText1')}
diff --git a/components/resources/brave_components_strings.grd b/components/resources/brave_components_strings.grd index 09eb4c0fcd1f..70545bb494de 100644 --- a/components/resources/brave_components_strings.grd +++ b/components/resources/brave_components_strings.grd @@ -211,7 +211,8 @@ Supported sites Tips Tip content creators directly as you browse. You can also set up recurring monthly tips so you can support sites continuously. - Coming soon. + Earnings are paid every month. + Set your desired frequency to increase or decrease earnings. Reward creators for the content you love. Your monthly payment gets distributed across the sites you visit. Sites will appear as you browse diff --git a/package-lock.json b/package-lock.json index b0ed77d7a992..6f2382fe544e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1237,8 +1237,8 @@ } }, "brave-ui": { - "version": "github:brave/brave-ui#2559426ccdd54a02bd16054a42c5c49fecdd5781", - "from": "github:brave/brave-ui#2559426ccdd54a02bd16054a42c5c49fecdd5781", + "version": "github:brave/brave-ui#b65e332d2251c51492aa9bbcfa6fb14dc4792290", + "from": "github:brave/brave-ui#b65e332d2251c51492aa9bbcfa6fb14dc4792290", "dev": true, "requires": { "emptykit.css": "^1.0.1", diff --git a/package.json b/package.json index 969d47a93880..1b685980c5e7 100644 --- a/package.json +++ b/package.json @@ -272,7 +272,7 @@ "@types/react-dom": "^16.0.7", "@types/react-redux": "6.0.4", "awesome-typescript-loader": "^5.2.0", - "brave-ui": "github:brave/brave-ui#2559426ccdd54a02bd16054a42c5c49fecdd5781", + "brave-ui": "github:brave/brave-ui#b65e332d2251c51492aa9bbcfa6fb14dc4792290", "css-loader": "^0.28.9", "csstype": "^2.5.5", "emptykit.css": "^1.0.1",