aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2017-02-21 08:00:13 +0800
committerGitHub <noreply@github.com>2017-02-21 08:00:13 +0800
commit838d19e17fb26daadd7f171cc6f0494ce29fe43d (patch)
tree122305492496b1f5cc84b62b2f49d7bf234ded3e /ui
parent6af200b3f38e78e956a48e670901d011ab8e8269 (diff)
parent9e81a0c8c4fb8311070dbf632e857a0a4156c4b8 (diff)
downloadtangerine-wallet-browser-838d19e17fb26daadd7f171cc6f0494ce29fe43d.tar
tangerine-wallet-browser-838d19e17fb26daadd7f171cc6f0494ce29fe43d.tar.gz
tangerine-wallet-browser-838d19e17fb26daadd7f171cc6f0494ce29fe43d.tar.bz2
tangerine-wallet-browser-838d19e17fb26daadd7f171cc6f0494ce29fe43d.tar.lz
tangerine-wallet-browser-838d19e17fb26daadd7f171cc6f0494ce29fe43d.tar.xz
tangerine-wallet-browser-838d19e17fb26daadd7f171cc6f0494ce29fe43d.tar.zst
tangerine-wallet-browser-838d19e17fb26daadd7f171cc6f0494ce29fe43d.zip
Merge pull request #1140 from MetaMask/i1128-noticesdev
Add notice functionality
Diffstat (limited to 'ui')
-rw-r--r--ui/app/app.js2
-rw-r--r--ui/app/components/notice.js13
2 files changed, 12 insertions, 3 deletions
diff --git a/ui/app/app.js b/ui/app/app.js
index f3581b56d..6e249b09e 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -350,7 +350,7 @@ App.prototype.renderPrimary = function () {
var props = this.props
// notices
- if (!props.noActiveNotices && !global.METAMASK_DEBUG) {
+ if (!props.noActiveNotices) {
log.debug('rendering notice screen for unread notices.')
return h(NoticeScreen, {
notice: props.lastUnreadNotice,
diff --git a/ui/app/components/notice.js b/ui/app/components/notice.js
index 00db734d7..23ded9d5d 100644
--- a/ui/app/components/notice.js
+++ b/ui/app/components/notice.js
@@ -15,10 +15,12 @@ function Notice () {
Notice.prototype.render = function () {
const { notice, onConfirm } = this.props
const { title, date, body } = notice
+ const state = this.state || { disclaimerDisabled: true }
+ const disabled = state.disclaimerDisabled
return (
h('.flex-column.flex-center.flex-grow', [
- h('h3.flex-center.text-transform-uppercacse.terms-header', {
+ h('h3.flex-center.text-transform-uppercase.terms-header', {
style: {
background: '#EBEBEB',
color: '#AEAEAE',
@@ -31,7 +33,7 @@ Notice.prototype.render = function () {
title,
]),
- h('h5.flex-center.text-transform-uppercacse.terms-header', {
+ h('h5.flex-center.text-transform-uppercase.terms-header', {
style: {
background: '#EBEBEB',
color: '#AEAEAE',
@@ -74,6 +76,12 @@ Notice.prototype.render = function () {
`),
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',
@@ -90,6 +98,7 @@ Notice.prototype.render = function () {
]),
h('button', {
+ disabled,
onClick: onConfirm,
style: {
marginTop: '18px',