hide proper things on lbry.tv
This commit is contained in:
parent
74a598c8cf
commit
39f0f97be0
10 changed files with 51 additions and 52 deletions
|
@ -119,6 +119,9 @@ const Button = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||||
<NavLink
|
<NavLink
|
||||||
ref={ref}
|
ref={ref}
|
||||||
exact
|
exact
|
||||||
|
onClick={e => {
|
||||||
|
e.stopPropagation();
|
||||||
|
}}
|
||||||
to={`/$/${PAGES.AUTH}?redirect=${pathname}`}
|
to={`/$/${PAGES.AUTH}?redirect=${pathname}`}
|
||||||
title={title}
|
title={title}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
|
|
|
@ -23,7 +23,6 @@ type Props = {
|
||||||
children?: React$Node,
|
children?: React$Node,
|
||||||
stretch?: boolean,
|
stretch?: boolean,
|
||||||
affixClass?: string, // class applied to prefix/postfix label
|
affixClass?: string, // class applied to prefix/postfix label
|
||||||
firstInList?: boolean, // at the top of a list, no padding top
|
|
||||||
autoFocus?: boolean,
|
autoFocus?: boolean,
|
||||||
labelOnLeft: boolean,
|
labelOnLeft: boolean,
|
||||||
inputProps?: {
|
inputProps?: {
|
||||||
|
|
|
@ -8,7 +8,6 @@ import { TRANSACTIONS, TX_LIST } from 'lbry-redux';
|
||||||
import * as PAGES from 'constants/pages';
|
import * as PAGES from 'constants/pages';
|
||||||
import TransactionListTable from 'component/transactionListTable';
|
import TransactionListTable from 'component/transactionListTable';
|
||||||
import RefreshTransactionButton from 'component/transactionRefreshButton';
|
import RefreshTransactionButton from 'component/transactionRefreshButton';
|
||||||
import Spinner from 'component/spinner';
|
|
||||||
import Paginate from 'component/common/paginate';
|
import Paginate from 'component/common/paginate';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
@ -44,54 +43,50 @@ function TransactionList(props: Props) {
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<header className="table__header">
|
<header className="table__header">
|
||||||
<h2 className="card__title--between">
|
<h2 className="card__title--between">
|
||||||
<span>
|
{title}
|
||||||
{title}
|
|
||||||
{loading && <Spinner type="small" />}
|
|
||||||
</span>
|
|
||||||
<div className="card__actions--inline">
|
<div className="card__actions--inline">
|
||||||
|
{/* @if TARGET='app' */}
|
||||||
|
{!slim && (
|
||||||
|
<FileExporter
|
||||||
|
data={transactions}
|
||||||
|
label={__('Export')}
|
||||||
|
title={__('Export Transactions')}
|
||||||
|
filters={['nout']}
|
||||||
|
defaultPath={__('lbry-transactions-history')}
|
||||||
|
disabled={!transactions.length}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{/* @endif */}
|
||||||
<RefreshTransactionButton />
|
<RefreshTransactionButton />
|
||||||
|
{!slim && (
|
||||||
|
<FormField
|
||||||
|
type="select"
|
||||||
|
name="file-sort"
|
||||||
|
value={filterSetting || TRANSACTIONS.ALL}
|
||||||
|
onChange={handleFilterChanged}
|
||||||
|
postfix={
|
||||||
|
<Button
|
||||||
|
button="link"
|
||||||
|
icon={icons.HELP}
|
||||||
|
href="https://lbry.com/faq/transaction-types"
|
||||||
|
title={__('Help')}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{transactionTypes.map(tt => (
|
||||||
|
<option key={tt} value={tt}>
|
||||||
|
{__(`${capitalize(tt)}`)}
|
||||||
|
</option>
|
||||||
|
))}
|
||||||
|
</FormField>
|
||||||
|
)}
|
||||||
{slim && <Button button="primary" navigate={`/$/${PAGES.TRANSACTIONS}`} label={__('Full History')} />}
|
{slim && <Button button="primary" navigate={`/$/${PAGES.TRANSACTIONS}`} label={__('Full History')} />}
|
||||||
</div>
|
</div>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
{!slim && (
|
|
||||||
<header className="table__header">
|
|
||||||
<div className="card__actions--between">
|
|
||||||
<FileExporter
|
|
||||||
data={transactions}
|
|
||||||
label={__('Export')}
|
|
||||||
title={__('Export Transactions')}
|
|
||||||
filters={['nout']}
|
|
||||||
defaultPath={__('lbry-transactions-history')}
|
|
||||||
disabled={!transactions.length}
|
|
||||||
/>
|
|
||||||
<FormField
|
|
||||||
type="select"
|
|
||||||
name="file-sort"
|
|
||||||
value={filterSetting || TRANSACTIONS.ALL}
|
|
||||||
onChange={handleFilterChanged}
|
|
||||||
label={__('Show')}
|
|
||||||
postfix={
|
|
||||||
<Button
|
|
||||||
button="link"
|
|
||||||
icon={icons.HELP}
|
|
||||||
href="https://lbry.com/faq/transaction-types"
|
|
||||||
title={__('Help')}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{transactionTypes.map(tt => (
|
|
||||||
<option key={tt} value={tt}>
|
|
||||||
{__(`${capitalize(tt)}`)}
|
|
||||||
</option>
|
|
||||||
))}
|
|
||||||
</FormField>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{!loading && !transactions.length && (
|
{((loading && !transactions.length) || !transactions.length) && (
|
||||||
<h2 className="main--empty empty">{emptyMessage || __('No transactions.')}</h2>
|
<h2 className="main--empty empty">{loading ? __('Loading') : emptyMessage || __('No transactions.')}</h2>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{!!transactions && !!transactions.length && <TransactionListTable transactionList={transactions} />}
|
{!!transactions && !!transactions.length && <TransactionListTable transactionList={transactions} />}
|
||||||
|
|
|
@ -38,7 +38,7 @@ class TransactionRefreshButton extends PureComponent<Props, State> {
|
||||||
const { fetchingTransactions } = this.props;
|
const { fetchingTransactions } = this.props;
|
||||||
const { label, disabled } = this.state;
|
const { label, disabled } = this.state;
|
||||||
return (
|
return (
|
||||||
<Button button="inverse" label={label} onClick={this.handleClick} disabled={disabled || fetchingTransactions} />
|
<Button button="link" label={label} onClick={this.handleClick} disabled={disabled || fetchingTransactions} />
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ Lbryio.setOverride(
|
||||||
{
|
{
|
||||||
auth_token: '',
|
auth_token: '',
|
||||||
language: 'en',
|
language: 'en',
|
||||||
app_id: status.installation_id,
|
// app_id: status.installation_id,
|
||||||
},
|
},
|
||||||
'post'
|
'post'
|
||||||
).then(response => {
|
).then(response => {
|
||||||
|
|
|
@ -34,9 +34,7 @@ export default function ChannelsPage(props: Props) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page>
|
<Page>
|
||||||
{/* @if TARGET='app' */}
|
|
||||||
{hasYoutubeChannels && <YoutubeTransferStatus hideChannelLink />}
|
{hasYoutubeChannels && <YoutubeTransferStatus hideChannelLink />}
|
||||||
{/* @endif */}
|
|
||||||
|
|
||||||
{channels && channels.length ? (
|
{channels && channels.length ? (
|
||||||
<div className="card">
|
<div className="card">
|
||||||
|
|
|
@ -33,8 +33,9 @@ class RewardsPage extends PureComponent<Props> {
|
||||||
}
|
}
|
||||||
renderPageHeader() {
|
renderPageHeader() {
|
||||||
const { user, daemonSettings, fetchUser } = this.props;
|
const { user, daemonSettings, fetchUser } = this.props;
|
||||||
|
const rewardsEnabled = IS_WEB || (daemonSettings && daemonSettings.share_usage_data);
|
||||||
|
|
||||||
if (user && !user.is_reward_approved && daemonSettings && daemonSettings.share_usage_data) {
|
if (user && !user.is_reward_approved && rewardsEnabled) {
|
||||||
if (!user.primary_email || !user.has_verified_email || !user.is_identity_verified) {
|
if (!user.primary_email || !user.has_verified_email || !user.is_identity_verified) {
|
||||||
return (
|
return (
|
||||||
!IS_WEB && (
|
!IS_WEB && (
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
import * as SETTINGS from 'constants/settings';
|
import * as SETTINGS from 'constants/settings';
|
||||||
import * as PAGES from 'constants/pages';
|
import * as PAGES from 'constants/pages';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
import { FormField, FormFieldPrice } from 'component/common/form';
|
import { FormField, FormFieldPrice } from 'component/common/form';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
import I18nMessage from 'component/i18nMessage';
|
import I18nMessage from 'component/i18nMessage';
|
||||||
|
@ -14,7 +15,6 @@ import FileSelector from 'component/common/file-selector';
|
||||||
import SyncToggle from 'component/syncToggle';
|
import SyncToggle from 'component/syncToggle';
|
||||||
import Card from 'component/common/card';
|
import Card from 'component/common/card';
|
||||||
import { getSavedPassword } from 'util/saved-passwords';
|
import { getSavedPassword } from 'util/saved-passwords';
|
||||||
|
|
||||||
type Price = {
|
type Price = {
|
||||||
currency: string,
|
currency: string,
|
||||||
amount: number,
|
amount: number,
|
||||||
|
@ -216,6 +216,7 @@ class SettingsPage extends React.PureComponent<Props, State> {
|
||||||
) : (
|
) : (
|
||||||
<div>
|
<div>
|
||||||
<Card title={__('Language')} actions={<SettingLanguage />} />
|
<Card title={__('Language')} actions={<SettingLanguage />} />
|
||||||
|
{/* @if TARGET='app' */}
|
||||||
<Card
|
<Card
|
||||||
title={__('Sync')}
|
title={__('Sync')}
|
||||||
subtitle={
|
subtitle={
|
||||||
|
@ -225,7 +226,6 @@ class SettingsPage extends React.PureComponent<Props, State> {
|
||||||
}
|
}
|
||||||
actions={<SyncToggle disabled={walletEncrypted && !storedPassword} />}
|
actions={<SyncToggle disabled={walletEncrypted && !storedPassword} />}
|
||||||
/>
|
/>
|
||||||
{/* @if TARGET='app' */}
|
|
||||||
<Card
|
<Card
|
||||||
title={__('Download Directory')}
|
title={__('Download Directory')}
|
||||||
actions={
|
actions={
|
||||||
|
|
|
@ -63,7 +63,11 @@ checkbox-element input[type='checkbox'] + label {
|
||||||
}
|
}
|
||||||
|
|
||||||
fieldset-section {
|
fieldset-section {
|
||||||
margin-bottom: var(--spacing-small);
|
margin: 0;
|
||||||
|
|
||||||
|
&:not(:first-of-type) {
|
||||||
|
margin-top: var(--spacing-small);
|
||||||
|
}
|
||||||
|
|
||||||
input,
|
input,
|
||||||
select,
|
select,
|
||||||
|
|
|
@ -23,7 +23,6 @@ td {
|
||||||
|
|
||||||
.table__header {
|
.table__header {
|
||||||
margin: var(--spacing-large);
|
margin: var(--spacing-large);
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.table__item--actionable {
|
.table__item--actionable {
|
||||||
|
|
Loading…
Add table
Reference in a new issue