diff --git a/src/renderer/component/common/credit-amount.jsx b/src/renderer/component/common/credit-amount.jsx index b948018a3..0eee4ec5e 100644 --- a/src/renderer/component/common/credit-amount.jsx +++ b/src/renderer/component/common/credit-amount.jsx @@ -77,7 +77,7 @@ class CreditAmount extends React.PureComponent { title={fullPrice} className={classnames('badge', { badge, - 'badge--cost': (badge && !isFree) || amount > 0, + 'badge--cost': badge && amount > 0, 'badge--free': badge && isFree, 'badge--large': large, })} diff --git a/src/renderer/component/transactionList/internal/transaction-list-item.jsx b/src/renderer/component/transactionList/internal/transaction-list-item.jsx index 375f5db69..997b85af1 100644 --- a/src/renderer/component/transactionList/internal/transaction-list-item.jsx +++ b/src/renderer/component/transactionList/internal/transaction-list-item.jsx @@ -1,5 +1,5 @@ // @flow -import type { Transaction } from '../view'; +import type { Transaction } from 'types/transaction'; import * as ICONS from 'constants/icons'; import React from 'react'; import ButtonTransaction from 'component/common/transaction-link'; @@ -53,12 +53,12 @@ class TransactionListItem extends React.PureComponent { return ( - +
{fee !== 0 && ( - + )} @@ -67,16 +67,17 @@ class TransactionListItem extends React.PureComponent { {reward && {reward.reward_title}} - {name && claimId && ( - - )} + {name && + claimId && ( + + )} diff --git a/src/renderer/component/transactionList/view.jsx b/src/renderer/component/transactionList/view.jsx index a2f80a884..8b2bb45e1 100644 --- a/src/renderer/component/transactionList/view.jsx +++ b/src/renderer/component/transactionList/view.jsx @@ -1,4 +1,5 @@ // @flow +import type { Transaction } from 'types/transaction'; import * as icons from 'constants/icons'; import * as MODALS from 'constants/modal_types'; import * as React from 'react'; @@ -8,17 +9,6 @@ import FileExporter from 'component/common/file-exporter'; import { TRANSACTIONS } from 'lbry-redux'; 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 = { emptyMessage: ?string, slim?: boolean, diff --git a/src/renderer/component/transactionListRecent/view.jsx b/src/renderer/component/transactionListRecent/view.jsx index 41312823b..4925b342e 100644 --- a/src/renderer/component/transactionListRecent/view.jsx +++ b/src/renderer/component/transactionListRecent/view.jsx @@ -1,5 +1,5 @@ // @flow -import type { Transaction } from 'component/transactionList/view'; +import type { Transaction } from 'types/transaction'; import * as icons from 'constants/icons'; import React, { Fragment } from 'react'; import BusyIndicator from 'component/common/busy-indicator'; @@ -28,7 +28,7 @@ class TransactionListRecent extends React.PureComponent { return (
-

+

{__('Recent Transactions')}

@@ -39,11 +39,12 @@ class TransactionListRecent extends React.PureComponent {

- {fetchingTransactions && !hasTransactions && ( -
- -
- )} + {fetchingTransactions && + !hasTransactions && ( +
+ +
+ )} {hasTransactions && ( diff --git a/src/renderer/page/transactionHistory/view.jsx b/src/renderer/page/transactionHistory/view.jsx index ef83422d9..06ed0fe83 100644 --- a/src/renderer/page/transactionHistory/view.jsx +++ b/src/renderer/page/transactionHistory/view.jsx @@ -27,7 +27,7 @@ class TransactionHistoryPage extends React.PureComponent {
-

+

{__('Transaction History')}

diff --git a/src/renderer/scss/component/_card.scss b/src/renderer/scss/component/_card.scss index e1977918c..a1b6412da 100644 --- a/src/renderer/scss/component/_card.scss +++ b/src/renderer/scss/component/_card.scss @@ -191,3 +191,9 @@ margin-left: var(--spacing-vertical-medium); } } + +.card__title--flex-between { + display: flex; + @include between; + align-items: center; +} diff --git a/src/renderer/scss/component/_table.scss b/src/renderer/scss/component/_table.scss index 9bb2a2318..3f9ea45b4 100644 --- a/src/renderer/scss/component/_table.scss +++ b/src/renderer/scss/component/_table.scss @@ -109,8 +109,4 @@ td:nth-of-type(5) { width: 15%; } - - .badge { - background-color: transparent !important; - } } diff --git a/src/renderer/types/transaction.js b/src/renderer/types/transaction.js new file mode 100644 index 000000000..37cd5f4b2 --- /dev/null +++ b/src/renderer/types/transaction.js @@ -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, +};