aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/eth-store-warning.js
diff options
context:
space:
mode:
authorFrankie <frankie.pangilinan@consensys.net>2016-08-11 04:48:34 +0800
committerFrankie <frankie.pangilinan@consensys.net>2016-08-11 04:48:34 +0800
commitba1edc429b948962fe0f03ef43588f7945cea3f2 (patch)
treeeda1b54a424c2fc06ef151763b5cb57d2e838116 /ui/app/eth-store-warning.js
parent9c6dd9ef4953f6e421feb6e6684ef43da26f6b75 (diff)
parentc48b60d7a6f14d2d2348be8d9a63965ca1267433 (diff)
downloadtangerine-wallet-browser-ba1edc429b948962fe0f03ef43588f7945cea3f2.tar.gz
tangerine-wallet-browser-ba1edc429b948962fe0f03ef43588f7945cea3f2.tar.zst
tangerine-wallet-browser-ba1edc429b948962fe0f03ef43588f7945cea3f2.zip
Merge branch 'master' into buyForm
Diffstat (limited to 'ui/app/eth-store-warning.js')
-rw-r--r--ui/app/eth-store-warning.js89
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..7fe54a309
--- /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),
+ }),
+ h('.warning', {
+ style: {
+ fontSize: '11px',
+ },
+
+ }, 'Don\'t 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 () {
+ this.props.dispatch(actions.agreeToEthWarning())
+}
+
+EthStoreWarning.prototype.toAccounts = function () {
+ this.props.dispatch(actions.showAccountDetail(this.props.account))
+}