parent
34b318754f
commit
737f833c41
9 changed files with 23 additions and 53 deletions
|
@ -1,13 +0,0 @@
|
||||||
// @flow
|
|
||||||
import * as ICONS from 'constants/icons';
|
|
||||||
import React from 'react';
|
|
||||||
import Button from 'component/button';
|
|
||||||
|
|
||||||
type Props = {
|
|
||||||
href: string,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default function HelpLink(props: Props) {
|
|
||||||
const { href } = props;
|
|
||||||
return <Button className="icon--help" icon={ICONS.HELP} description={__('Help')} href={href} />;
|
|
||||||
}
|
|
|
@ -57,7 +57,7 @@ function UserEmailNew(props: Props) {
|
||||||
<div className="section">
|
<div className="section">
|
||||||
<FormField
|
<FormField
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
name="age_checkbox"
|
name="sync_checkbox"
|
||||||
label={
|
label={
|
||||||
<I18nMessage
|
<I18nMessage
|
||||||
tokens={{
|
tokens={{
|
||||||
|
|
|
@ -12,10 +12,12 @@ type Props = {
|
||||||
claimsBalance: number,
|
claimsBalance: number,
|
||||||
supportsBalance: number,
|
supportsBalance: number,
|
||||||
tipsBalance: number,
|
tipsBalance: number,
|
||||||
|
rewards: Array<Reward>,
|
||||||
};
|
};
|
||||||
|
|
||||||
const WalletBalance = (props: Props) => {
|
const WalletBalance = (props: Props) => {
|
||||||
const { balance, claimsBalance, supportsBalance, tipsBalance } = props;
|
const { balance, claimsBalance, supportsBalance, tipsBalance, rewards } = props;
|
||||||
|
const rewardTotal = rewards.reduce((acc, val) => acc + val.reward_amount, 0);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
|
@ -27,12 +29,24 @@ const WalletBalance = (props: Props) => {
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div className="section__actions">
|
<div className="section__actions">
|
||||||
<Button button="inverse" icon={ICONS.SEND} label={__('Send Credits')} navigate={`$/${PAGES.WALLET_SEND}`} />
|
<Button button="inverse" label={__('Send Credits')} navigate={`$/${PAGES.WALLET_SEND}`} />
|
||||||
<Button button="inverse" label={__('Your Address')} navigate={`$/${PAGES.WALLET_RECEIVE}`} />
|
<Button button="inverse" label={__('Your Address')} navigate={`$/${PAGES.WALLET_RECEIVE}`} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
<div className="section">
|
||||||
|
<div className="section__flex">
|
||||||
|
<Icon sectionIcon icon={ICONS.FEATURED} />
|
||||||
|
<h2 className="section__title--small">
|
||||||
|
<strong>
|
||||||
|
<CreditAmount badge={false} amount={rewardTotal} precision={8} />
|
||||||
|
</strong>{' '}
|
||||||
|
{__('Earned From Rewards')}
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="section">
|
<div className="section">
|
||||||
<div className="section__flex">
|
<div className="section__flex">
|
||||||
<Icon sectionIcon icon={ICONS.TIP} />
|
<Icon sectionIcon icon={ICONS.TIP} />
|
||||||
|
@ -40,7 +54,7 @@ const WalletBalance = (props: Props) => {
|
||||||
<strong>
|
<strong>
|
||||||
<CreditAmount badge={false} amount={tipsBalance} precision={8} />
|
<CreditAmount badge={false} amount={tipsBalance} precision={8} />
|
||||||
</strong>{' '}
|
</strong>{' '}
|
||||||
{__('Earned and bound in tips')}
|
{__('Earned From Tips')}
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -54,12 +68,12 @@ const WalletBalance = (props: Props) => {
|
||||||
</h2>
|
</h2>
|
||||||
<div className="section__subtitle">
|
<div className="section__subtitle">
|
||||||
<dl>
|
<dl>
|
||||||
<dt>{__('... in your publishes')}</dt>
|
<dt>{__('Your Publishes')}</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<CreditAmount badge={false} amount={claimsBalance} precision={8} />
|
<CreditAmount badge={false} amount={claimsBalance} precision={8} />
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>{__('... in your supports')}</dt>
|
<dt>{__('Your Supports')}</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<CreditAmount badge={false} amount={supportsBalance} precision={8} />
|
<CreditAmount badge={false} amount={supportsBalance} precision={8} />
|
||||||
</dd>
|
</dd>
|
||||||
|
|
|
@ -20,7 +20,6 @@ import * as MODALS from 'constants/modal_types';
|
||||||
import { Form, FormField } from 'component/common/form';
|
import { Form, FormField } from 'component/common/form';
|
||||||
import ClaimPreview from 'component/claimPreview';
|
import ClaimPreview from 'component/claimPreview';
|
||||||
import Icon from 'component/common/icon';
|
import Icon from 'component/common/icon';
|
||||||
import HelpLink from 'component/common/help-link';
|
|
||||||
|
|
||||||
const PAGE_VIEW_QUERY = `view`;
|
const PAGE_VIEW_QUERY = `view`;
|
||||||
const ABOUT_PAGE = `about`;
|
const ABOUT_PAGE = `about`;
|
||||||
|
@ -191,7 +190,6 @@ function ChannelPage(props: Props) {
|
||||||
<ClaimUri uri={uri} />
|
<ClaimUri uri={uri} />
|
||||||
<span>
|
<span>
|
||||||
{subCount} {subCount !== 1 ? __('Subscribers') : __('Subscriber')}
|
{subCount} {subCount !== 1 ? __('Subscribers') : __('Subscriber')}
|
||||||
<HelpLink href="https://lbry.com/faq/views" />
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -18,7 +18,6 @@ import CommentsList from 'component/commentsList';
|
||||||
import CommentCreate from 'component/commentCreate';
|
import CommentCreate from 'component/commentCreate';
|
||||||
import ClaimUri from 'component/claimUri';
|
import ClaimUri from 'component/claimUri';
|
||||||
import ClaimPreview from 'component/claimPreview';
|
import ClaimPreview from 'component/claimPreview';
|
||||||
import HelpLink from 'component/common/help-link';
|
|
||||||
|
|
||||||
export const FILE_WRAPPER_CLASS = 'grid-area--content';
|
export const FILE_WRAPPER_CLASS = 'grid-area--content';
|
||||||
|
|
||||||
|
@ -162,7 +161,6 @@ class FilePage extends React.Component<Props> {
|
||||||
<DateTime uri={uri} show={DateTime.SHOW_DATE} />
|
<DateTime uri={uri} show={DateTime.SHOW_DATE} />
|
||||||
<span>
|
<span>
|
||||||
{viewCount} {viewCount !== 1 ? __('Views') : __('View')}
|
{viewCount} {viewCount !== 1 ? __('Views') : __('View')}
|
||||||
<HelpLink href="https://lbry.com/faq/views" />
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -511,7 +511,6 @@ class SettingsPage extends React.PureComponent<Props, State> {
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
{/* @if TARGET='app' */}
|
{/* @if TARGET='app' */}
|
||||||
<FormField
|
<FormField
|
||||||
disabled
|
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
name="encrypt_wallet"
|
name="encrypt_wallet"
|
||||||
onChange={() => this.onChangeEncryptWallet()}
|
onChange={() => this.onChangeEncryptWallet()}
|
||||||
|
@ -519,19 +518,9 @@ class SettingsPage extends React.PureComponent<Props, State> {
|
||||||
label={__('Encrypt my wallet with a custom password')}
|
label={__('Encrypt my wallet with a custom password')}
|
||||||
helper={
|
helper={
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<I18nMessage
|
{__('Secure your local wallet data with a custom password.')}{' '}
|
||||||
tokens={{
|
|
||||||
learn_more: (
|
|
||||||
<Button button="link" label={__('Learn more')} href="https://lbry.com/faq/account-sync" />
|
|
||||||
),
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Wallet encryption is currently unavailable until it's supported for synced accounts. It will
|
|
||||||
be added back soon. %learn_more%
|
|
||||||
</I18nMessage>
|
|
||||||
{/* {__('Secure your local wallet data with a custom password.')}{' '}
|
|
||||||
<strong>{__('Lost passwords cannot be recovered.')} </strong>
|
<strong>{__('Lost passwords cannot be recovered.')} </strong>
|
||||||
<Button button="link" label={__('Learn more')} href="https://lbry.com/faq/wallet-encryption" />. */}
|
<Button button="link" label={__('Learn more')} href="https://lbry.com/faq/wallet-encryption" />.
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -467,10 +467,6 @@ export function doSignIn() {
|
||||||
// For existing users, check if they've synced before, or have 0 balance
|
// For existing users, check if they've synced before, or have 0 balance
|
||||||
if (syncEnabled && (syncHash || balance === 0)) {
|
if (syncEnabled && (syncHash || balance === 0)) {
|
||||||
dispatch(doGetSync());
|
dispatch(doGetSync());
|
||||||
|
|
||||||
setInterval(() => {
|
|
||||||
dispatch(doGetSync());
|
|
||||||
}, 1000 * 60 * 5);
|
|
||||||
}
|
}
|
||||||
// @endif
|
// @endif
|
||||||
|
|
||||||
|
|
|
@ -20,11 +20,3 @@
|
||||||
background-color: var(--color-card-actions--dark);
|
background-color: var(--color-card-actions--dark);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon--help {
|
|
||||||
margin-left: var(--spacing-small);
|
|
||||||
bottom: -0.3rem;
|
|
||||||
opacity: 0.7;
|
|
||||||
height: 1rem;
|
|
||||||
width: 1rem;
|
|
||||||
}
|
|
||||||
|
|
|
@ -818,9 +818,5 @@
|
||||||
"You aren’t blocking any channels": "You aren’t blocking any channels",
|
"You aren’t blocking any channels": "You aren’t blocking any channels",
|
||||||
"When you block a channel, all content from that channel will be hidden.": "When you block a channel, all content from that channel will be hidden.",
|
"When you block a channel, all content from that channel will be hidden.": "When you block a channel, all content from that channel will be hidden.",
|
||||||
"dfsdfsdf": "dfsdfsdf",
|
"dfsdfsdf": "dfsdfsdf",
|
||||||
"Light": "Light",
|
"Light": "Light"
|
||||||
"Wallet encryption is currently unavailable until it's supported for synced accounts. It will be added back soon. %learn_more%": "Wallet encryption is currently unavailable until it's supported for synced accounts. It will be added back soon. %learn_more%",
|
|
||||||
"... in your publishes": "... in your publishes",
|
|
||||||
"... in your supports": "... in your supports",
|
|
||||||
"Earned and bound in tips": "Earned and bound in tips"
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue