diff options
author | sdtsui <szehungdanieltsui@gmail.com> | 2017-08-23 03:47:48 +0800 |
---|---|---|
committer | sdtsui <szehungdanieltsui@gmail.com> | 2017-08-23 03:47:58 +0800 |
commit | 97a6a8e4f6ea41373061e9dccdd1ad0b002cdcac (patch) | |
tree | ad5a6374987062644660e1eb1ca1f837995e7d6d /ui/app/send.js | |
parent | 65d27623466527edfa42e29807e658c073eebcc2 (diff) | |
download | tangerine-wallet-browser-97a6a8e4f6ea41373061e9dccdd1ad0b002cdcac.tar tangerine-wallet-browser-97a6a8e4f6ea41373061e9dccdd1ad0b002cdcac.tar.gz tangerine-wallet-browser-97a6a8e4f6ea41373061e9dccdd1ad0b002cdcac.tar.bz2 tangerine-wallet-browser-97a6a8e4f6ea41373061e9dccdd1ad0b002cdcac.tar.lz tangerine-wallet-browser-97a6a8e4f6ea41373061e9dccdd1ad0b002cdcac.tar.xz tangerine-wallet-browser-97a6a8e4f6ea41373061e9dccdd1ad0b002cdcac.tar.zst tangerine-wallet-browser-97a6a8e4f6ea41373061e9dccdd1ad0b002cdcac.zip |
Add layout and props for send screen inputs
Diffstat (limited to 'ui/app/send.js')
-rw-r--r-- | ui/app/send.js | 77 |
1 files changed, 66 insertions, 11 deletions
diff --git a/ui/app/send.js b/ui/app/send.js index 3b52c9500..4317fb3a2 100644 --- a/ui/app/send.js +++ b/ui/app/send.js @@ -11,6 +11,7 @@ const isHex = require('./util').isHex const EthBalance = require('./components/eth-balance') const EnsInput = require('./components/ens-input') const ethUtil = require('ethereumjs-util') +const { getSelectedIdentity } = require('./selectors') const ARAGON = '960b236A07cf122663c4303350609A66A7B288C0' @@ -18,6 +19,7 @@ module.exports = connect(mapStateToProps)(SendTransactionScreen) function mapStateToProps (state) { var result = { + selectedIdentity: getSelectedIdentity(state), address: state.metamask.selectedAddress, accounts: state.metamask.accounts, identities: state.metamask.identities, @@ -47,6 +49,7 @@ SendTransactionScreen.prototype.render = function () { const props = this.props const { + selectedIdentity, address, account, identity, @@ -75,26 +78,42 @@ SendTransactionScreen.prototype.render = function () { h('div', {}, [ 'Send' - ]) + ]), - h('div', {}, [ + h('div', { + style: { + textAlign: 'center', + }, + }, [ 'Send Ethereum to anyone with an Ethereum account' - ]) + ]), - h('div', {}, [ + h('div.send-screen-input-wrapper', {}, [ h('div', {}, [ 'From:' ]), - h('input', { - placeholder: '(Placeholder) - My Account 1 - 5924 - Available ETH 2.0'. + h('input.large-input.send-screen-input', { + list: 'accounts', + value: selectedIdentity.address }, [ - ]) + ]), - ]) + h('datalist#accounts', {}, [ + Object.keys(props.identities).map((key) => { + const identity = props.identities[key] + return h('option', { + value: identity.address, + label: identity.name, + key: identity.address, + }) + }), + ]), - h('div', {}, [ + ]), + + h('div.send-screen-input-wrapper', {}, [ h('div', {}, [ 'To:' @@ -109,9 +128,45 @@ SendTransactionScreen.prototype.render = function () { addressBook, }), - ]) + ]), + + h('div.send-screen-input-wrapper', {}, [ + + h('div.send-screen-amount-labels', {}, [ + h('span', {}, ['Amount']), + h('span', {}, ['ETH <> USD']) + ]), + + h('input.large-input.send-screen-input', { + placeholder: '$0 USD', + }, []), + + ]), + + h('div.send-screen-input-wrapper', {}, [ + + h('div.send-screen-gas-labels', {}, [ + h('span', {}, [ + h('i.fa.fa-bolt', {}, []), + 'Gas fee:', + ]), + h('span', {}, ['What\'s this?']), + ]), + + h('input.large-input.send-screen-input', { + placeholder: '0', + }, []), + + ]), + + h('div.send-screen-input-wrapper', {}, [ - // [WIP] - Styling Send Screen - Need to bring in data contract for signTx + h('div', {}, ['Transaction memo (optional)']), + + h('input.large-input.send-screen-input', {}, [ + ]), + + ]), ]), |