use correct tx price color and fix tx refresh button layout
This commit is contained in:
parent
4aabfb731e
commit
bae0534d99
8 changed files with 42 additions and 37 deletions
|
@ -77,7 +77,7 @@ class CreditAmount extends React.PureComponent<Props> {
|
||||||
title={fullPrice}
|
title={fullPrice}
|
||||||
className={classnames('badge', {
|
className={classnames('badge', {
|
||||||
badge,
|
badge,
|
||||||
'badge--cost': (badge && !isFree) || amount > 0,
|
'badge--cost': badge && amount > 0,
|
||||||
'badge--free': badge && isFree,
|
'badge--free': badge && isFree,
|
||||||
'badge--large': large,
|
'badge--large': large,
|
||||||
})}
|
})}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// @flow
|
// @flow
|
||||||
import type { Transaction } from '../view';
|
import type { Transaction } from 'types/transaction';
|
||||||
import * as ICONS from 'constants/icons';
|
import * as ICONS from 'constants/icons';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ButtonTransaction from 'component/common/transaction-link';
|
import ButtonTransaction from 'component/common/transaction-link';
|
||||||
|
@ -53,12 +53,12 @@ class TransactionListItem extends React.PureComponent<Props> {
|
||||||
return (
|
return (
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<CreditAmount inheritStyle showPlus amount={amount} precision={8} />
|
<CreditAmount showPlus amount={amount} precision={8} />
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
{fee !== 0 && (
|
{fee !== 0 && (
|
||||||
<span className="table__item-label">
|
<span className="table__item-label">
|
||||||
<CreditAmount inheritStyle fee amount={fee} precision={8} />
|
<CreditAmount fee amount={fee} precision={8} />
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</td>
|
</td>
|
||||||
|
@ -67,16 +67,17 @@ class TransactionListItem extends React.PureComponent<Props> {
|
||||||
</td>
|
</td>
|
||||||
<td className="table__item--actionable">
|
<td className="table__item--actionable">
|
||||||
{reward && <span>{reward.reward_title}</span>}
|
{reward && <span>{reward.reward_title}</span>}
|
||||||
{name && claimId && (
|
{name &&
|
||||||
<Button
|
claimId && (
|
||||||
constrict
|
<Button
|
||||||
button="link"
|
constrict
|
||||||
navigate="/show"
|
button="link"
|
||||||
navigateParams={{ uri: buildURI({ claimName: name, claimId }) }}
|
navigate="/show"
|
||||||
>
|
navigateParams={{ uri: buildURI({ claimName: name, claimId }) }}
|
||||||
{name}
|
>
|
||||||
</Button>
|
{name}
|
||||||
)}
|
</Button>
|
||||||
|
)}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
import type { Transaction } from 'types/transaction';
|
||||||
import * as icons from 'constants/icons';
|
import * as icons from 'constants/icons';
|
||||||
import * as MODALS from 'constants/modal_types';
|
import * as MODALS from 'constants/modal_types';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
@ -8,17 +9,6 @@ import FileExporter from 'component/common/file-exporter';
|
||||||
import { TRANSACTIONS } from 'lbry-redux';
|
import { TRANSACTIONS } from 'lbry-redux';
|
||||||
import TransactionListItem from './internal/transaction-list-item';
|
import TransactionListItem from './internal/transaction-list-item';
|
||||||
|
|
||||||
export type Transaction = {
|
|
||||||
amount: number,
|
|
||||||
claim_id: string,
|
|
||||||
claim_name: string,
|
|
||||||
fee: number,
|
|
||||||
nout: number,
|
|
||||||
txid: string,
|
|
||||||
type: string,
|
|
||||||
date: Date,
|
|
||||||
};
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
emptyMessage: ?string,
|
emptyMessage: ?string,
|
||||||
slim?: boolean,
|
slim?: boolean,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// @flow
|
// @flow
|
||||||
import type { Transaction } from 'component/transactionList/view';
|
import type { Transaction } from 'types/transaction';
|
||||||
import * as icons from 'constants/icons';
|
import * as icons from 'constants/icons';
|
||||||
import React, { Fragment } from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import BusyIndicator from 'component/common/busy-indicator';
|
import BusyIndicator from 'component/common/busy-indicator';
|
||||||
|
@ -28,7 +28,7 @@ class TransactionListRecent extends React.PureComponent<Props> {
|
||||||
return (
|
return (
|
||||||
<section className="card card--section">
|
<section className="card card--section">
|
||||||
<header className="card__header card__header--flat">
|
<header className="card__header card__header--flat">
|
||||||
<h2 className="card__title">
|
<h2 className="card__title card__title--flex-between">
|
||||||
{__('Recent Transactions')}
|
{__('Recent Transactions')}
|
||||||
<RefreshTransactionButton />
|
<RefreshTransactionButton />
|
||||||
</h2>
|
</h2>
|
||||||
|
@ -39,11 +39,12 @@ class TransactionListRecent extends React.PureComponent<Props> {
|
||||||
</p>
|
</p>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
{fetchingTransactions && !hasTransactions && (
|
{fetchingTransactions &&
|
||||||
<div className="card__content">
|
!hasTransactions && (
|
||||||
<BusyIndicator message={__('Loading transactions')} />
|
<div className="card__content">
|
||||||
</div>
|
<BusyIndicator message={__('Loading transactions')} />
|
||||||
)}
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{hasTransactions && (
|
{hasTransactions && (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
|
|
|
@ -27,7 +27,7 @@ class TransactionHistoryPage extends React.PureComponent<Props> {
|
||||||
<Page>
|
<Page>
|
||||||
<section className="card card--section">
|
<section className="card card--section">
|
||||||
<header className="card__header card__header--flat">
|
<header className="card__header card__header--flat">
|
||||||
<h2 className="card__title">
|
<h2 className="card__title card__title--flex-between ">
|
||||||
{__('Transaction History')}
|
{__('Transaction History')}
|
||||||
<RefreshTransactionButton />
|
<RefreshTransactionButton />
|
||||||
</h2>
|
</h2>
|
||||||
|
|
|
@ -191,3 +191,9 @@
|
||||||
margin-left: var(--spacing-vertical-medium);
|
margin-left: var(--spacing-vertical-medium);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card__title--flex-between {
|
||||||
|
display: flex;
|
||||||
|
@include between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
|
@ -109,8 +109,4 @@
|
||||||
td:nth-of-type(5) {
|
td:nth-of-type(5) {
|
||||||
width: 15%;
|
width: 15%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge {
|
|
||||||
background-color: transparent !important;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
11
src/renderer/types/transaction.js
Normal file
11
src/renderer/types/transaction.js
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
// @flow
|
||||||
|
export type Transaction = {
|
||||||
|
amount: number,
|
||||||
|
claim_id: string,
|
||||||
|
claim_name: string,
|
||||||
|
fee: number,
|
||||||
|
nout: number,
|
||||||
|
txid: string,
|
||||||
|
type: string,
|
||||||
|
date: Date,
|
||||||
|
};
|
Loading…
Add table
Reference in a new issue