A few tweaks

This commit is contained in:
Thomas Zarebczan 2020-05-21 21:19:01 -04:00 committed by Sean Yesmunt
parent 21f9fc7b31
commit 6d888b5121
7 changed files with 55 additions and 28 deletions

View file

@ -1214,5 +1214,6 @@
"%duration% minutes ago": "%duration% minutes ago", "%duration% minutes ago": "%duration% minutes ago",
"%duration% minute ago": "%duration% minute ago", "%duration% minute ago": "%duration% minute ago",
"%duration% seconds ago": "%duration% seconds ago", "%duration% seconds ago": "%duration% seconds ago",
"%duration% second ago": "%duration% second ago" "%duration% second ago": "%duration% second ago",
} "Check your rewards page to see if you qualify for paid content reimbursement. Only content in this section qualifies.": "Check your rewards page to see if you qualify for paid content reimbursement. Only content in this section qualifies."
}

View file

@ -72,7 +72,7 @@ export default function CreatorAnalytics(props: Props) {
subtitle={ subtitle={
error === GENERIC_ERROR error === GENERIC_ERROR
? __( ? __(
'There are no stats for this channel. Make sure you are signed in with the correct email and have data sharing turned on.' 'There are no stats for this channel yet, it will take a few views. Make sure you are signed in with the correct email and have data sharing turned on.'
) )
: __( : __(
"You are not able to see this channel's stats. Make sure you are signed in with the correct email and have data sharing turned on." "You are not able to see this channel's stats. Make sure you are signed in with the correct email and have data sharing turned on."
@ -170,7 +170,7 @@ export default function CreatorAnalytics(props: Props) {
{stats.VideoURITopNew ? ( {stats.VideoURITopNew ? (
<Card <Card
className="section" className="section"
title={__('Your Recent Content')} title={__('Most Viewed Recent Content')}
body={ body={
<React.Fragment> <React.Fragment>
<div className="card--inline"> <div className="card--inline">
@ -217,7 +217,7 @@ export default function CreatorAnalytics(props: Props) {
<Card <Card
className="section" className="section"
title={__('Most Viewed Content')} title={__('Most Viewed Content All Time')}
body={ body={
<React.Fragment> <React.Fragment>
<div className="card--inline"> <div className="card--inline">

View file

@ -30,12 +30,12 @@ class TxoListItem extends React.PureComponent<Props, State> {
(this: any).getLink = this.getLink.bind(this); (this: any).getLink = this.getLink.bind(this);
} }
getLink(type: string) { getLink(type: string, tip: boolean) {
const { abandonState } = this.state; const { abandonState } = this.state;
if (this.state.abandonState === ABANDON_STATES.PENDING) { if (this.state.abandonState === ABANDON_STATES.PENDING) {
return <Spinner type={'small'} />; return <Spinner type={'small'} />;
} }
if (type === TXO.SUPPORT) { if (tip && type === TXO.SUPPORT) {
return ( return (
<Button <Button
disabled={abandonState === ABANDON_STATES.DONE || abandonState === ABANDON_STATES.ERROR} disabled={abandonState === ABANDON_STATES.DONE || abandonState === ABANDON_STATES.ERROR}
@ -123,7 +123,7 @@ class TxoListItem extends React.PureComponent<Props, State> {
(valueType && ((valueType === 'stream' && __('Publish')) || __(toCapitalCase(valueType)))) || (valueType && ((valueType === 'stream' && __('Publish')) || __(toCapitalCase(valueType)))) ||
(type && __(toCapitalCase(type)))} (type && __(toCapitalCase(type)))}
</span>{' '} </span>{' '}
{isRevokeable && this.getLink(type)} {isRevokeable && this.getLink(type, isTip)}
</td> </td>
<td> <td>
{forClaim && <Button button="link" navigate={uri} label={claimName} disabled={!date} />} {forClaim && <Button button="link" navigate={uri} label={claimName} disabled={!date} />}

View file

@ -75,6 +75,7 @@ const WalletBalance = (props: Props) => {
<CreditAmount badge={false} amount={tipsBalance} precision={8} /> <CreditAmount badge={false} amount={tipsBalance} precision={8} />
</strong>{' '} </strong>{' '}
{__('earned and bound in tips')} {__('earned and bound in tips')}
<HelpLink href="https://lbry.com/faq/tipping" />
</h2> </h2>
</div> </div>
</div> </div>

View file

@ -17,26 +17,26 @@ type Props = {
export default function ModalRevokeClaim(props: Props) { export default function ModalRevokeClaim(props: Props) {
const { tx, claim, closeModal, abandonTxo, abandonClaim, cb } = props; const { tx, claim, closeModal, abandonTxo, abandonClaim, cb } = props;
const { value_type: valueType, type, normalized_name: name } = tx || claim; const { value_type: valueType, type, normalized_name: name, is_my_input: isSupport } = tx || claim;
const [channelName, setChannelName] = useState(''); const [channelName, setChannelName] = useState('');
function getButtonLabel(type: string) { function getButtonLabel(type: string, isSupport: boolean) {
if (type === txnTypes.TIP) { if (isSupport && type === txnTypes.SUPPORT) {
return 'Confirm Tip Unlock';
} else if (type === txnTypes.SUPPORT) {
return 'Confirm Support Revoke'; return 'Confirm Support Revoke';
} else if (type === txnTypes.SUPPORT) {
return 'Confirm Tip Unlock';
} }
return 'Confirm Claim Revoke'; return 'Confirm Claim Revoke';
} }
function getMsgBody(type: string, name: string) { function getMsgBody(type: string, isSupport: boolean, name: string) {
if (type === txnTypes.TIP) { if (isSupport && type === txnTypes.SUPPORT) {
return ( return (
<React.Fragment> <React.Fragment>
<p>{__('Are you sure you want to unlock these credits?')}</p> <p>{__('Are you sure you want to remove this support?')}</p>
<p> <p>
{__( {__(
'These credits are permanently yours and can be unlocked at any time. Unlocking them allows you to spend them, but can hurt the performance of your content in lookups and search results. It is recommended you leave tips locked until you need or want to spend them.' "These credits are permanently yours and can be removed at any time. Removing this support will reduce the claim's discoverability and return the LBC to your spendable balance."
)} )}
</p> </p>
</React.Fragment> </React.Fragment>
@ -44,10 +44,10 @@ export default function ModalRevokeClaim(props: Props) {
} else if (type === txnTypes.SUPPORT) { } else if (type === txnTypes.SUPPORT) {
return ( return (
<React.Fragment> <React.Fragment>
<p>{__('Are you sure you want to remove this support?')}</p> <p>{__('Are you sure you want to unlock these credits?')}</p>
<p> <p>
{__( {__(
"These credits are permanently yours and can be removed at any time. Removing this support will reduce the claim's discoverability and return the LBC to your spendable balance." 'These credits are permanently yours and can be unlocked at any time. Unlocking them allows you to spend them, but can hurt the performance of your content in lookups and search results. It is recommended you leave tips locked until you need or want to spend them.'
)} )}
</p> </p>
</React.Fragment> </React.Fragment>
@ -88,7 +88,7 @@ export default function ModalRevokeClaim(props: Props) {
closeModal(); closeModal();
} }
const label = getButtonLabel(type); const label = getButtonLabel(type, isSupport);
return ( return (
<Modal <Modal
@ -102,7 +102,7 @@ export default function ModalRevokeClaim(props: Props) {
> >
<Card <Card
title={label} title={label}
body={getMsgBody(type, name)} body={getMsgBody(type, isSupport, name)}
actions={ actions={
<div className="section__actions"> <div className="section__actions">
<Button button="primary" label={label} onClick={revokeClaim} /> <Button button="primary" label={label} onClick={revokeClaim} />

View file

@ -1,5 +1,6 @@
// @flow // @flow
import * as ICONS from 'constants/icons'; import * as ICONS from 'constants/icons';
import Icon from 'component/common/icon';
import * as PAGES from 'constants/pages'; import * as PAGES from 'constants/pages';
import * as CS from 'constants/claim_search'; import * as CS from 'constants/claim_search';
import React from 'react'; import React from 'react';
@ -67,6 +68,7 @@ const PAID_BETA_CHANNEL_IDS_KEY = [
'8972a1bd06de5186e5e89292b05aac8aaa817791', '8972a1bd06de5186e5e89292b05aac8aaa817791',
'5da63df97c8255ae94a88940695b8471657dd5a1', '5da63df97c8255ae94a88940695b8471657dd5a1',
'f3da2196b5151570d980b34d311ee0973225a68e', 'f3da2196b5151570d980b34d311ee0973225a68e',
'7644fdb8342624f6c647c79de25610801573fa68',
]; ];
type Props = { type Props = {
@ -94,10 +96,21 @@ function HomePage(props: Props) {
link: `/$/${PAGES.DISCOVER}?${CS.TAGS_KEY}=lbrytvpaidbeta&fee_amount=>0&${CS.CLAIM_TYPE}=${CS.CLAIM_STREAM}&${ link: `/$/${PAGES.DISCOVER}?${CS.TAGS_KEY}=lbrytvpaidbeta&fee_amount=>0&${CS.CLAIM_TYPE}=${CS.CLAIM_STREAM}&${
CS.CHANNEL_IDS_KEY CS.CHANNEL_IDS_KEY
}=${PAID_BETA_CHANNEL_IDS_KEY.join(',')}`, }=${PAID_BETA_CHANNEL_IDS_KEY.join(',')}`,
help: (
<div className="claim-grid__help">
<Icon
icon={ICONS.HELP}
tooltip
customTooltipText={__(
'Check your rewards page to see if you qualify for paid content reimbursement. Only content in this section qualifies.'
)}
/>
</div>
),
options: { options: {
feeAmount: '>0', feeAmount: '>0',
claimType: ['stream'], claimType: ['stream'],
tags: ['lbrytvpaidbeta'], tags: ['lbrytvpaidbeta', 'lbry tvpaidbeta'],
pageSize: 8, pageSize: 8,
channelIds: PAID_BETA_CHANNEL_IDS_KEY, channelIds: PAID_BETA_CHANNEL_IDS_KEY,
}, },

View file

@ -49,15 +49,27 @@ class RewardsPage extends PureComponent<Props> {
body={ body={
<React.Fragment> <React.Fragment>
<p> <p>
{__('This account must undergo review before you can participate in the rewards program.')}{' '} {__(
{__('This can take anywhere from several minutes to several days.')} 'This account must undergo review before you can participate in the rewards program. Not all users and regions may qualify.'
)}{' '}
{__('This can take anywhere from a few hours to several days. Please be patient.')}
</p> </p>
<p>{__('We apologize for this inconvenience, but have added this additional step to prevent fraud.')}</p>
<p> <p>
{`${__('If you continue to see this message, send us an email to help@lbry.com.')} ${__( {__(
'Please enjoy free content in the meantime!' 'We apologize for this inconvenience, but have added this additional step to prevent abuse. Users on VPN or shared connections will continue to see this message and are not not eligible for Rewards.'
)}`} )}
</p>
<p>
<I18nMessage
tokens={{
rewards_faq: <Button button="link" label={__('Rewards FAQ')} href="https://lbry.com/faq/support" />,
}}
>
Please review the %rewards_faq% for eligibility, and send us an email to help@lbry.com if you continue
to see this message. You can continue to use LBRY without this feature.
</I18nMessage>
{`${__('Enjoy all the awesome free content in the meantime!')}`}
</p> </p>
</React.Fragment> </React.Fragment>
} }