diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2016-07-23 02:15:47 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2016-07-23 02:15:47 +0800 |
commit | 86832e6feb502a3f1de24b81b111addf1f06bea6 (patch) | |
tree | 8f3ac5ce8c1772916d93cf79e7fd7336e3b6a7bc /ui/app/eth-store-warning.js | |
parent | 22528002e1edef84ade67d5bc30b2580e6542c05 (diff) | |
parent | 0bbfedc2bf21d8c3eec17fef35e93a98a946469e (diff) | |
download | tangerine-wallet-browser-86832e6feb502a3f1de24b81b111addf1f06bea6.tar tangerine-wallet-browser-86832e6feb502a3f1de24b81b111addf1f06bea6.tar.gz tangerine-wallet-browser-86832e6feb502a3f1de24b81b111addf1f06bea6.tar.bz2 tangerine-wallet-browser-86832e6feb502a3f1de24b81b111addf1f06bea6.tar.lz tangerine-wallet-browser-86832e6feb502a3f1de24b81b111addf1f06bea6.tar.xz tangerine-wallet-browser-86832e6feb502a3f1de24b81b111addf1f06bea6.tar.zst tangerine-wallet-browser-86832e6feb502a3f1de24b81b111addf1f06bea6.zip |
Fix merge conflicts. Fix typos. Ensure currency immediately updated on load.
Diffstat (limited to 'ui/app/eth-store-warning.js')
-rw-r--r-- | ui/app/eth-store-warning.js | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/ui/app/eth-store-warning.js b/ui/app/eth-store-warning.js new file mode 100644 index 000000000..4cc5da81c --- /dev/null +++ b/ui/app/eth-store-warning.js @@ -0,0 +1,89 @@ +const connect = require('react-redux').connect +const Component = require('react').Component +const h = require('react-hyperscript') +const inherits = require('util').inherits +const actions = require('./actions') + +module.exports = connect(mapStateToProps)(EthStoreWarning) + +inherits(EthStoreWarning, Component) +function EthStoreWarning () { + Component.call(this) +} + +function mapStateToProps (state) { + return { + selectedAccount: state.metamask.selectedAccount, + } +} + +EthStoreWarning.prototype.render = function () { + + return ( + + h('.flex-column', { + key: 'ethWarning', + style: { + paddingTop: '25px', + marginRight: '30px', + marginLeft: '30px', + alignItems: 'center', + }, + }, [ + h('.warning', { + style: { + margin: '10px 10px 10px 10px', + }, + }, + `MetaMask is currently in beta - + exercise caution while handling + and storing your ether. + `), + + h('i.fa.fa-exclamation-triangle.fa-4', { + style: { + fontSize: '152px', + color: '#AEAEAE', + textAlign: 'center', + }, + }), + + h('.flex-row', { + style: { + marginTop: '25px', + marginBottom: '10px', + }, + }, [ + h('input', { + type: 'checkbox', + onChange: this.toggleShowWarning.bind(this, event), + }), + h('.warning', { + style: { + fontSize: '11px', + }, + + }, 'Dont show me this message again'), + ]), + h('.flex-row', { + style: { + width: '100%', + justifyContent: 'space-around', + }, + }, [ + h('button', { + onClick: this.toAccounts.bind(this), + }, + 'Continue to MetaMask'), + ]), + ]) + ) +} + +EthStoreWarning.prototype.toggleShowWarning = function (event) { + this.props.dispatch(actions.agreeToEthWarning()) +} + +EthStoreWarning.prototype.toAccounts = function () { + this.props.dispatch(actions.showAccountDetail(this.props.account)) +} |