Skip to content

Commit

Permalink
Fixes brave-browser/issues#2846, updates ads disabled content
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanml committed Jan 10, 2019
1 parent e63fb7f commit c53eeda
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 27 deletions.
6 changes: 2 additions & 4 deletions browser/ui/webui/brave_webui_source.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,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 },
Expand Down Expand Up @@ -189,7 +186,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 },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
<includes>
<!-- WebUI Brave Rewards resources -->
<include name="IDR_BRAVE_REWARDS_HTML" file="ui/brave_rewards.html" type="BINDATA" />
<include name="IDR_BRAVE_REWARDS_IMG_ADS_DISABLED" file="img/ads_disabled.svg" type="BINDATA" />
<include name="IDR_BRAVE_REWARDS_IMG_CONTRIBUTE_DISABLED" file="img/contribute_disabled.svg" type="BINDATA" />
<include name="IDR_BRAVE_REWARDS_IMG_DONATE_DISABLED" file="img/donate_disabled.svg" type="BINDATA" />
<include name="IDR_BRAVE_REWARDS_IMG_WALLET_BG" file="img/wallet_bg.svg" type="BINDATA" />
<include name="IDR_BRAVE_REWARDS_IMG_CAPTCHA_BAT" file="img/captcha_bat.png" type="BINDATA" />
<include name="IDR_BRAVE_REWARDS_IMG_WELCOME_BG" file="img/welcome_bg.svg" type="BINDATA" />
Expand Down
1 change: 0 additions & 1 deletion components/brave_rewards/resources/img/ads_disabled.svg

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion components/brave_rewards/resources/img/donate_disabled.svg

This file was deleted.

7 changes: 2 additions & 5 deletions components/brave_rewards/resources/ui/components/adsBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
}

Expand All @@ -38,10 +35,10 @@ class AdsBox extends React.Component<Props, State> {
adsDisabled = () => {
return (
<DisabledContent
image={adsDisabledIcon}
type={'ads'}
>
<h3>{getLocale('adsDisabledText')}</h3>
{getLocale('adsDisabledTextOne')} <br />
{getLocale('adsDisabledTextTwo')}
</DisabledContent>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -69,7 +66,6 @@ class ContributeBox extends React.Component<Props, State> {
contributeDisabled () {
return (
<DisabledContent
image={contributeDisabledIcon}
type={'contribute'}
>
{getLocale('contributionDisabledText1')} <br />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
}

Expand All @@ -51,7 +48,6 @@ class DonationBox extends React.Component<Props, State> {
disabledContent = () => {
return (
<DisabledContent
image={donate}
type={'donation'}
>
{getLocale('donationDisabledText1')}<br/>
Expand Down
3 changes: 2 additions & 1 deletion components/resources/brave_components_strings.grd
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@
<message name="IDS_BRAVE_REWARDS_LOCAL_CONTR_SITES" desc="">Supported sites</message>
<message name="IDS_BRAVE_REWARDS_LOCAL_DONAT_TITLE" desc="">Tips</message>
<message name="IDS_BRAVE_REWARDS_LOCAL_DONAT_DESC" desc="">Tip content creators directly as you browse. You can also set up recurring monthly tips so you can support sites continuously.</message>
<message name="IDS_BRAVE_REWARDS_LOCAL_ADS_DISABLED_TEXT" desc="">Coming soon.</message>
<message name="IDS_BRAVE_REWARDS_LOCAL_ADS_DISABLED_TEXT_ONE" desc="">Earnings are paid every month.</message>
<message name="IDS_BRAVE_REWARDS_LOCAL_ADS_DISABLED_TEXT_TWO" desc="">Set your desired frequency to increase or decrease earnings.</message>
<message name="IDS_BRAVE_REWARDS_LOCAL_CONTR_DISABLED_TEXT1" desc="">Reward creators for the content you love.</message>
<message name="IDS_BRAVE_REWARDS_LOCAL_CONTR_DISABLED_TEXT2" desc="">Your monthly payment gets distributed across the sites you visit.</message>
<message name="IDS_BRAVE_REWARDS_LOCAL_CONTR_VISIT_SOME" desc="">Sites will appear as you browse</message>
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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#f31f02320476dfb6a3f419172e1fb0931ccfd9ea",
"brave-ui": "github:brave/brave-ui#18386d1f0c65cbb5ad624fa48a761f0f2c58dbd9",
"css-loader": "^0.28.9",
"csstype": "^2.5.5",
"emptykit.css": "^1.0.1",
Expand Down

0 comments on commit c53eeda

Please sign in to comment.