2016-06-17 01:55:22 +02:00
|
|
|
const inherits = require('util').inherits
|
|
|
|
const Component = require('react').Component
|
|
|
|
const h = require('react-hyperscript')
|
|
|
|
const connect = require('react-redux').connect
|
|
|
|
const actions = require('../actions')
|
|
|
|
const fs = require('fs')
|
|
|
|
const path = require('path')
|
|
|
|
const disclaimer = fs.readFileSync(path.join(__dirname, 'disclaimer.txt')).toString()
|
|
|
|
module.exports = connect(mapStateToProps)(DisclaimerScreen)
|
|
|
|
|
2016-06-21 22:18:32 +02:00
|
|
|
function mapStateToProps (state) {
|
2016-06-17 01:55:22 +02:00
|
|
|
return {}
|
|
|
|
}
|
|
|
|
|
|
|
|
inherits(DisclaimerScreen, Component)
|
2016-06-21 22:18:32 +02:00
|
|
|
function DisclaimerScreen () {
|
2016-06-17 01:55:22 +02:00
|
|
|
Component.call(this)
|
|
|
|
}
|
|
|
|
|
2016-06-21 22:18:32 +02:00
|
|
|
DisclaimerScreen.prototype.render = function () {
|
2016-06-17 01:55:22 +02:00
|
|
|
return (
|
|
|
|
h('.flex-column.flex-center.flex-grow', [
|
|
|
|
|
|
|
|
h('h3.flex-center.text-transform-uppercase', {
|
|
|
|
style: {
|
|
|
|
background: '#EBEBEB',
|
|
|
|
color: '#AEAEAE',
|
|
|
|
marginBottom: 24,
|
|
|
|
width: '100%',
|
|
|
|
fontSize: '20px',
|
|
|
|
padding: 6,
|
|
|
|
},
|
|
|
|
}, [
|
|
|
|
'MetaMask Terms & Conditions',
|
|
|
|
]),
|
|
|
|
|
|
|
|
h('div', {
|
|
|
|
style: {
|
2016-06-17 02:11:13 +02:00
|
|
|
whiteSpace: 'pre-line',
|
2016-06-17 01:55:22 +02:00
|
|
|
background: 'rgb(235, 235, 235)',
|
2016-06-17 01:57:56 +02:00
|
|
|
height: '336px',
|
2016-06-17 02:11:13 +02:00
|
|
|
padding: '6px',
|
2016-06-17 01:55:22 +02:00
|
|
|
width: '80%',
|
|
|
|
overflowY: 'scroll',
|
2016-06-21 22:18:32 +02:00
|
|
|
},
|
2016-06-17 01:55:22 +02:00
|
|
|
}, disclaimer),
|
|
|
|
|
|
|
|
h('button', {
|
|
|
|
style: { marginTop: '18px' },
|
2016-06-21 22:18:32 +02:00
|
|
|
onClick: () => this.props.dispatch(actions.agreeToDisclaimer()),
|
|
|
|
}, 'I Agree'),
|
2016-06-17 01:55:22 +02:00
|
|
|
])
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|