Skip to content

Commit

Permalink
Adds new contribution flow for unverified publishers
Browse files Browse the repository at this point in the history
  • Loading branch information
NejcZdovc committed Jan 7, 2019
1 parent 79b7d89 commit 98a1596
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 37 deletions.
2 changes: 2 additions & 0 deletions browser/ui/webui/brave_webui_source.cc
Expand Up @@ -362,6 +362,8 @@ void CustomizeWebUIHTMLSource(const std::string &name, content::WebUIDataSource*
{ "recurringDonation", IDS_BRAVE_UI_RECURRING_DONATION },
{ "recurringDonations", IDS_BRAVE_UI_RECURRING_DONATIONS },
{ "remove", IDS_BRAVE_UI_REMOVE },
{ "reservedAmountText", IDS_BRAVE_UI_RESERVED_AMOUNT_TEXT },
{ "reservedMoreLink", IDS_BRAVE_UI_RESERVED_MORE_LINK },
{ "restore", IDS_BRAVE_UI_RESTORE },
{ "restoreAll", IDS_BRAVE_UI_RESTORE_ALL },
{ "reviewSitesMsg", IDS_BRAVE_UI_REVIEW_SITE_MSG },
Expand Down
Expand Up @@ -290,11 +290,15 @@
"description": "Status of the publisher shown in the panel"
},
"unVerifiedText": {
"message": "This creator has not yet signed up to receive contributions from Brave users.",
"message": "This creator has not yet signed up to receive contributions from Brave users. Any tips you send will remain in your wallet until they verify.",
"description": "Notice about unverified publisher."
},
"unVerifiedTextMore": {
"reservedAmountText": {
"message": "You’ve designated {{reservedAmount}} BAT for creators who haven’t yet signed up to receive contributions. We’ll keep trying to contribute until they verify, or until 90 days have passed.",
"description": "Notification about how much BAT do you have reserved"
},
"reservedMoreLink": {
"message": "Learn more.",
"description": "Learn more button that opens FAQ"
"description": "Text for the link that explains more about reserved amount"
}
}
Expand Up @@ -72,6 +72,8 @@ export const getUIMessages = (): Record<string, string> => {
'on',
'oneTimeDonation',
'recurringDonations',
'reservedAmountText',
'reservedMoreLink',
'rewardsContribute',
'rewardsContributeAttentionScore',
'rewardsSummary',
Expand Down
Expand Up @@ -369,7 +369,12 @@ export class Panel extends React.Component<Props, State> {
/>
: null
}
<WalletSummary compact={true} {...this.getWalletSummary()}/>
<WalletSummary
compact={true}
reservedAmount={10.0}
reservedMoreLink={'https://brave.com/faq-rewards'}
{...this.getWalletSummary()}
/>
</WalletSummarySlider>
</WalletWrapper>
)
Expand Down
Expand Up @@ -299,7 +299,11 @@ class PageWallet extends React.Component<Props, State> {
enabledMain
? emptyWallet
? <WalletEmpty />
: <WalletSummary {...this.getWalletSummary()}/>
: <WalletSummary
reservedAmount={10.0}
reservedMoreLink={'https://brave.com/faq-rewards'}
{...this.getWalletSummary()}
/>
: <WalletOff/>
}
</WalletWrapper>
Expand Down
4 changes: 3 additions & 1 deletion components/resources/brave_components_strings.grd
Expand Up @@ -365,6 +365,8 @@
<message name="IDS_BRAVE_UI_RECURRING_DONATION" desc="">Monthly Tips</message>
<message name="IDS_BRAVE_UI_RECURRING_DONATIONS" desc="">Monthly Tips</message>
<message name="IDS_BRAVE_UI_REMOVE" desc="">remove</message>
<message name="IDS_BRAVE_UI_RESERVED_AMOUNT_TEXT" desc="Notification about how much BAT do you have reserved">You’ve designated {{reservedAmount}} BAT for creators who haven’t yet signed up to receive contributions. We’ll keep trying to contribute until they verify, or until 90 days have passed.</message>
<message name="IDS_BRAVE_UI_RESERVED_MORE_LINK" desc="Text for the link that explains more about reserved amount">Learn more.</message>
<message name="IDS_BRAVE_UI_RESTORE" desc="">Restore</message>
<message name="IDS_BRAVE_UI_RESTORE_ALL" desc="">Restore All</message>
<message name="IDS_BRAVE_UI_REVIEW_SITE_MSG" desc="">Your pinned sites have been moved to</message>
Expand Down Expand Up @@ -443,7 +445,7 @@
<message name="IDS_BRAVE_UI_VIEW_DETAILS" desc="">View Details</message>
<message name="IDS_BRAVE_UI_REWARDS_CREATING_TEXT" desc="">Creating wallet</message>
<message name="IDS_BRAVE_UI_SITE_BANNER_NOTICE_NOTE" desc="">NOTE:</message>
<message name="IDS_BRAVE_UI_SITE_BANNER_NOTICE_TEXT" desc="">This creator has not yet verified their site. As soon as they verify with Brave, they will receive your tip.</message>
<message name="IDS_BRAVE_UI_SITE_BANNER_NOTICE_TEXT" desc="">This creator has not yet signed up to receive contributions from Brave users. We’ll keep trying to contribute until they verify, or until 90 days have passed.</message>
<message name="IDS_BRAVE_UI_SITE_UNVERIFIED_TEXT_MORE" desc="">Learn more.</message>

<!-- WebUI brave sync resources -->
Expand Down
60 changes: 30 additions & 30 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
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#2e89af51c9e142a9af4b8952f06a6168411ca12a",
"brave-ui": "github:brave/brave-ui#a22753c4350477d32c919c3495548dcd347ecf14",
"css-loader": "^0.28.9",
"csstype": "^2.5.5",
"emptykit.css": "^1.0.1",
Expand Down

0 comments on commit 98a1596

Please sign in to comment.