diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2017-02-10 10:17:50 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2017-02-10 10:17:50 +0800 |
commit | 65c84ac4b2a8a4355bff63690d34e52a4a45a561 (patch) | |
tree | 69c02a96a370d8444655d0b6b72899ec69d07dfe /ui/app/first-time | |
parent | 1d0fcf129c8bd7174aecccca3acf54ee83215d19 (diff) | |
download | tangerine-wallet-browser-65c84ac4b2a8a4355bff63690d34e52a4a45a561.tar tangerine-wallet-browser-65c84ac4b2a8a4355bff63690d34e52a4a45a561.tar.gz tangerine-wallet-browser-65c84ac4b2a8a4355bff63690d34e52a4a45a561.tar.bz2 tangerine-wallet-browser-65c84ac4b2a8a4355bff63690d34e52a4a45a561.tar.lz tangerine-wallet-browser-65c84ac4b2a8a4355bff63690d34e52a4a45a561.tar.xz tangerine-wallet-browser-65c84ac4b2a8a4355bff63690d34e52a4a45a561.tar.zst tangerine-wallet-browser-65c84ac4b2a8a4355bff63690d34e52a4a45a561.zip |
Delete all code related to disclaimers.
Diffstat (limited to 'ui/app/first-time')
-rw-r--r-- | ui/app/first-time/disclaimer.js | 112 |
1 files changed, 0 insertions, 112 deletions
diff --git a/ui/app/first-time/disclaimer.js b/ui/app/first-time/disclaimer.js deleted file mode 100644 index a8bafd39b..000000000 --- a/ui/app/first-time/disclaimer.js +++ /dev/null @@ -1,112 +0,0 @@ -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 ReactMarkdown = require('react-markdown') -const fs = require('fs') -const path = require('path') -const linker = require('extension-link-enabler') -const findDOMNode = require('react-dom').findDOMNode -const disclaimer = fs.readFileSync(path.join(__dirname, '..', '..', '..', 'USER_AGREEMENT.md')).toString() -module.exports = connect(mapStateToProps)(DisclaimerScreen) - -function mapStateToProps (state) { - return {} -} - -inherits(DisclaimerScreen, Component) -function DisclaimerScreen () { - Component.call(this) -} - -DisclaimerScreen.prototype.render = function () { - const state = this.state || {disclaimerDisabled: true} - const disabled = state.disclaimerDisabled - - return ( - h('.flex-column.flex-center.flex-grow', [ - - h('h3.flex-center.text-transform-uppercase.terms-header', { - style: { - background: '#EBEBEB', - color: '#AEAEAE', - marginBottom: 24, - width: '100%', - fontSize: '20px', - textAlign: 'center', - padding: 6, - }, - }, [ - 'MetaMask Terms & Conditions', - ]), - - h('style', ` - - .markdown { - font-family: Times New Roman; - overflow-x: hidden; - } - .markdown h1, .markdown h2, .markdown h3 { - margin: 10px 0; - font-weight: bold; - } - - .markdown strong { - font-weight: bold; - } - .markdown em { - font-style: italic; - } - - .markdown p { - margin: 10px 0; - } - - .markdown a { - color: blue; - } - - `), - - h('div.markdown', { - onScroll: (e) => { - var object = e.currentTarget - if (object.offsetHeight + object.scrollTop + 100 >= object.scrollHeight) { - this.setState({disclaimerDisabled: false}) - } - }, - style: { - background: 'rgb(235, 235, 235)', - height: '310px', - padding: '6px', - width: '80%', - overflowY: 'scroll', - }, - }, [ - - h(ReactMarkdown, { - source: disclaimer, - skipHtml: true, - }), - - ]), - - h('button', { - style: { marginTop: '18px' }, - disabled, - onClick: () => this.props.dispatch(actions.agreeToDisclaimer()), - }, disabled ? 'Scroll Down to Enable' : 'I Agree'), - ]) - ) -} - -DisclaimerScreen.prototype.componentDidMount = function () { - var node = findDOMNode(this) - linker.setupListener(node) -} - -DisclaimerScreen.prototype.componentWillUnmount = function () { - var node = findDOMNode(this) - linker.teardownListener(node) -} |