aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/notice.js
diff options
context:
space:
mode:
authorDan Finlay <flyswatter@users.noreply.github.com>2016-12-23 06:43:43 +0800
committerGitHub <noreply@github.com>2016-12-23 06:43:43 +0800
commit898e96fd6ae905932a60d60c42e2c3bddab65556 (patch)
tree23fba23503db1da05c1b397487aa71e3d9cb7d58 /ui/app/components/notice.js
parent98527c1c254fe2d438191c73053dcf3223062ef3 (diff)
parentd3b2698f341e1d0dda86612cdf331e51067719c5 (diff)
downloadtangerine-wallet-browser-898e96fd6ae905932a60d60c42e2c3bddab65556.tar
tangerine-wallet-browser-898e96fd6ae905932a60d60c42e2c3bddab65556.tar.gz
tangerine-wallet-browser-898e96fd6ae905932a60d60c42e2c3bddab65556.tar.bz2
tangerine-wallet-browser-898e96fd6ae905932a60d60c42e2c3bddab65556.tar.lz
tangerine-wallet-browser-898e96fd6ae905932a60d60c42e2c3bddab65556.tar.xz
tangerine-wallet-browser-898e96fd6ae905932a60d60c42e2c3bddab65556.tar.zst
tangerine-wallet-browser-898e96fd6ae905932a60d60c42e2c3bddab65556.zip
Merge pull request #948 from MetaMask/RecoverLostAccounts
Auto-Recover accounts lost to BIP44 derivation fix
Diffstat (limited to 'ui/app/components/notice.js')
-rw-r--r--ui/app/components/notice.js110
1 files changed, 110 insertions, 0 deletions
diff --git a/ui/app/components/notice.js b/ui/app/components/notice.js
new file mode 100644
index 000000000..00db734d7
--- /dev/null
+++ b/ui/app/components/notice.js
@@ -0,0 +1,110 @@
+const inherits = require('util').inherits
+const Component = require('react').Component
+const h = require('react-hyperscript')
+const ReactMarkdown = require('react-markdown')
+const linker = require('extension-link-enabler')
+const findDOMNode = require('react-dom').findDOMNode
+
+module.exports = Notice
+
+inherits(Notice, Component)
+function Notice () {
+ Component.call(this)
+}
+
+Notice.prototype.render = function () {
+ const { notice, onConfirm } = this.props
+ const { title, date, body } = notice
+
+ return (
+ h('.flex-column.flex-center.flex-grow', [
+ h('h3.flex-center.text-transform-uppercacse.terms-header', {
+ style: {
+ background: '#EBEBEB',
+ color: '#AEAEAE',
+ width: '100%',
+ fontSize: '20px',
+ textAlign: 'center',
+ padding: 6,
+ },
+ }, [
+ title,
+ ]),
+
+ h('h5.flex-center.text-transform-uppercacse.terms-header', {
+ style: {
+ background: '#EBEBEB',
+ color: '#AEAEAE',
+ marginBottom: 24,
+ width: '100%',
+ fontSize: '20px',
+ textAlign: 'center',
+ padding: 6,
+ },
+ }, [
+ date,
+ ]),
+
+ h('style', `
+
+ .markdown {
+ 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: #df6b0e;
+ }
+
+ `),
+
+ h('div.markdown', {
+ style: {
+ background: 'rgb(235, 235, 235)',
+ height: '310px',
+ padding: '6px',
+ width: '90%',
+ overflowY: 'scroll',
+ scroll: 'auto',
+ },
+ }, [
+ h(ReactMarkdown, {
+ source: body,
+ skipHtml: true,
+ }),
+ ]),
+
+ h('button', {
+ onClick: onConfirm,
+ style: {
+ marginTop: '18px',
+ },
+ }, 'Continue'),
+ ])
+ )
+}
+
+Notice.prototype.componentDidMount = function () {
+ var node = findDOMNode(this)
+ linker.setupListener(node)
+}
+
+Notice.prototype.componentWillUnmount = function () {
+ var node = findDOMNode(this)
+ linker.teardownListener(node)
+}