Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff0be53
commit fe1c655
Showing
7 changed files
with
131 additions
and
130 deletions.
There are no files selected for viewing
127 changes: 0 additions & 127 deletions
127
source/renderer/app/components/wallet/transactions/TransactionsHeader.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
102 changes: 102 additions & 0 deletions
102
source/renderer/app/components/wallet/transactions/WalletTransactionsHeader.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
// @flow | ||
import React, { Component } from 'react'; | ||
import { observer, inject } from 'mobx-react'; | ||
import { defineMessages, intlShape } from 'react-intl'; | ||
import FilterDialog from './FilterDialog'; | ||
import FilterButton from './FilterButton'; | ||
import FilterResultInfo from './FilterResultInfo'; | ||
import styles from './WalletTransactionsHeader.scss'; | ||
// import TinyButton from '../widgets/forms/TinyButton'; | ||
import type { TransactionFilterOptionsType } from '../../../stores/TransactionsStore'; | ||
|
||
export const messages = defineMessages({ | ||
transactions: { | ||
id: 'wallet.transactions.header.transactions', | ||
defaultMessage: '!!!Transactions', | ||
description: 'Label for the "Transactions" header.', | ||
}, | ||
}); | ||
|
||
type Props = { | ||
transactions: Array<WalletTransaction>, | ||
filterOptions: TransactionFilterOptionsType, | ||
currentLocale: string, | ||
currentDateFormat: string, | ||
currentNumberFormat: string, | ||
defaultFilterOptions: TransactionFilterOptionsType, | ||
populatedFilterOptions: TransactionFilterOptionsType, | ||
onFilter: Function, | ||
onClose: Function, | ||
}; | ||
|
||
type State = { | ||
isFilterButtonFaded: boolean, | ||
}; | ||
|
||
@observer | ||
export default class WalletTransactionsHeader extends Component<Props, State> { | ||
static contextTypes = { | ||
intl: intlShape.isRequired, | ||
}; | ||
|
||
state = { | ||
isFilterButtonFaded: false, | ||
}; | ||
|
||
setFilterButtonFaded = (isFilterButtonFaded: boolean) => | ||
this.setState({ isFilterButtonFaded }); | ||
|
||
render() { | ||
const { intl } = this.context; | ||
const { isFilterButtonFaded } = this.state; | ||
const { transactions, filterOptions } = this.props; | ||
console.log('filterOptions', filterOptions); | ||
|
||
return ( | ||
<div className={styles.component}> | ||
<div className={styles.numberOfTransactions}> | ||
{intl.formatMessage(messages.transactions)} ({transactions.length}) | ||
</div> | ||
</div> | ||
); | ||
|
||
// const { | ||
// filterOptions, | ||
// searchRequest, | ||
// hasAny, | ||
// totalAvailable, | ||
// allFiltered, | ||
// recentFiltered, | ||
// deletePendingTransaction, | ||
// deleteTransactionRequest, | ||
// } = stores.transactions; | ||
// const { currentTimeFormat, currentDateFormat, currentLocale } = profile; | ||
|
||
// // Guard against potential null values | ||
// if (!filterOptions || !activeWallet) return null; | ||
|
||
// let walletTransactions = null; | ||
// const { searchLimit } = filterOptions; | ||
// const numberOfFilterDimensionsApplied = getNumberOfFilterDimensionsApplied( | ||
// filterOptions | ||
// ); | ||
// const noTransactionsLabel = intl.formatMessage(messages.noTransactions); | ||
// const hasMoreToLoad = () => | ||
// searchLimit !== null && | ||
// searchLimit !== undefined && | ||
// totalAvailable > searchLimit; | ||
|
||
// return ( | ||
// <div> | ||
// <FilterDialogContainer /> | ||
// {hasAny && ( | ||
// <FilterButton | ||
// numberOfFilterDimensionsApplied={numberOfFilterDimensionsApplied} | ||
// faded={isFilterButtonFaded} | ||
// onClick={this.openFilterDialog} | ||
// /> | ||
// )} | ||
// </div> | ||
// ); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
source/renderer/app/components/wallet/transactions/WalletTransactionsHeader.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.component { | ||
height: 53px; | ||
padding: 0 40px; | ||
} | ||
.numberOfTransactions { | ||
// background: red; | ||
color: orange; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters