mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Add disclaimer component
This commit is contained in:
parent
f5fa0d3fa5
commit
93fa97f86a
56
ui/app/first-time/disclaimer.js
Normal file
56
ui/app/first-time/disclaimer.js
Normal file
@ -0,0 +1,56 @@
|
||||
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)
|
||||
|
||||
function mapStateToProps(state) {
|
||||
return {}
|
||||
}
|
||||
|
||||
inherits(DisclaimerScreen, Component)
|
||||
function DisclaimerScreen() {
|
||||
Component.call(this)
|
||||
}
|
||||
|
||||
DisclaimerScreen.prototype.render = function() {
|
||||
|
||||
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: {
|
||||
background: 'rgb(235, 235, 235)',
|
||||
height: '235px',
|
||||
|
||||
width: '80%',
|
||||
overflowY: 'scroll',
|
||||
}
|
||||
}, disclaimer),
|
||||
|
||||
h('button', {
|
||||
style: { marginTop: '18px' },
|
||||
onClick: () => this.props.dispatch(actions.agreeToDisclaimer())
|
||||
}, 'I Agree')
|
||||
])
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user