UI tweak for reward changes

This commit is contained in:
Jeremy Kauffman 2019-12-19 12:33:33 -05:00
parent b91ef3dee1
commit 66ba3a23c2
3 changed files with 14 additions and 8 deletions

View file

@ -933,5 +933,7 @@
"Your Blocked Channels": "Your Blocked Channels", "Your Blocked Channels": "Your Blocked Channels",
"Bid position must be a number.": "Bid position must be a number.", "Bid position must be a number.": "Bid position must be a number.",
"Copy": "Copy", "Copy": "Copy",
"Text copied": "Text copied" "Text copied": "Text copied",
"Rewards Disabled": "Rewards Disabled",
"Woah, you have a lot of friends! You've claimed the maximum amount of referral rewards. Check back soon to see if more are available!.": "Woah, you have a lot of friends! You've claimed the maximum amount of referral rewards. Check back soon to see if more are available!."
} }

View file

@ -62,6 +62,8 @@ class TransactionListItem extends React.PureComponent<Props> {
year: 'numeric', year: 'numeric',
}; };
const forClaim = name && claimId;
return ( return (
<tr> <tr>
<td> <td>
@ -80,8 +82,8 @@ class TransactionListItem extends React.PureComponent<Props> {
<span>{this.capitalize(type)}</span> {isRevokeable && this.getLink(type)} <span>{this.capitalize(type)}</span> {isRevokeable && this.getLink(type)}
</td> </td>
<td> <td>
{reward && <span>{reward.reward_title}</span>} {forClaim && <Button button="link" navigate={uri} label={claimName} />}
{name && claimId && <Button button="link" navigate={uri} label={claimName} />} {!forClaim && reward && <span>{reward.reward_title}</span>}
</td> </td>
<td> <td>

View file

@ -10,6 +10,7 @@ import classnames from 'classnames';
import { rewards as REWARD_TYPES } from 'lbryinc'; import { rewards as REWARD_TYPES } from 'lbryinc';
import RewardAuthIntro from 'component/rewardAuthIntro'; import RewardAuthIntro from 'component/rewardAuthIntro';
import Card from 'component/common/card'; import Card from 'component/common/card';
import I18nMessage from 'component/i18nMessage';
type Props = { type Props = {
doAuth: () => void, doAuth: () => void,
@ -84,11 +85,12 @@ class RewardsPage extends PureComponent<Props> {
if (!IS_WEB && daemonSettings && !daemonSettings.share_usage_data) { if (!IS_WEB && daemonSettings && !daemonSettings.share_usage_data) {
return ( return (
<section className="card card--section"> <section className="card card--section">
<h2 className="card__title card__title--deprecated">{__('Disabled')}</h2> <h2 className="card__title card__title--deprecated">{__('Rewards Disabled')}</h2>
<p className="section__subtitle"> <p className="error-text">
{__('Rewards are currently disabled for your account. Turn on diagnostic data sharing, in')}{' '} <I18nMessage tokens={{ settings: <Button button="link" navigate="/$/settings" label="Settings" /> }}>
<Button button="link" navigate="/$/settings" label="Settings" /> Rewards are currently disabled for your account. Turn on diagnostic data sharing, in %settings%, to
{__(', in order to re-enable them.')} re-enable them.
</I18nMessage>
</p> </p>
</section> </section>
); );