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",
"Bid position must be a number.": "Bid position must be a number.",
"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',
};
const forClaim = name && claimId;
return (
<tr>
<td>
@ -80,8 +82,8 @@ class TransactionListItem extends React.PureComponent<Props> {
<span>{this.capitalize(type)}</span> {isRevokeable && this.getLink(type)}
</td>
<td>
{reward && <span>{reward.reward_title}</span>}
{name && claimId && <Button button="link" navigate={uri} label={claimName} />}
{forClaim && <Button button="link" navigate={uri} label={claimName} />}
{!forClaim && reward && <span>{reward.reward_title}</span>}
</td>
<td>

View file

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