mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-30 08:09:15 +01:00
Notices must be scrolled down to proceed from.
This commit is contained in:
parent
bf9d1f405f
commit
e54b73679c
@ -15,6 +15,8 @@ function Notice () {
|
|||||||
Notice.prototype.render = function () {
|
Notice.prototype.render = function () {
|
||||||
const { notice, onConfirm } = this.props
|
const { notice, onConfirm } = this.props
|
||||||
const { title, date, body } = notice
|
const { title, date, body } = notice
|
||||||
|
const state = this.state || { disclaimerDisabled: true }
|
||||||
|
const disabled = state.disclaimerDisabled
|
||||||
|
|
||||||
return (
|
return (
|
||||||
h('.flex-column.flex-center.flex-grow', [
|
h('.flex-column.flex-center.flex-grow', [
|
||||||
@ -74,6 +76,12 @@ Notice.prototype.render = function () {
|
|||||||
`),
|
`),
|
||||||
|
|
||||||
h('div.markdown', {
|
h('div.markdown', {
|
||||||
|
onScroll: (e) => {
|
||||||
|
var object = e.currentTarget
|
||||||
|
if (object.offsetHeight + object.scrollTop + 100 >= object.scrollHeight) {
|
||||||
|
this.setState({disclaimerDisabled: false})
|
||||||
|
}
|
||||||
|
},
|
||||||
style: {
|
style: {
|
||||||
background: 'rgb(235, 235, 235)',
|
background: 'rgb(235, 235, 235)',
|
||||||
height: '310px',
|
height: '310px',
|
||||||
@ -90,6 +98,7 @@ Notice.prototype.render = function () {
|
|||||||
]),
|
]),
|
||||||
|
|
||||||
h('button', {
|
h('button', {
|
||||||
|
disabled,
|
||||||
onClick: onConfirm,
|
onClick: onConfirm,
|
||||||
style: {
|
style: {
|
||||||
marginTop: '18px',
|
marginTop: '18px',
|
||||||
|
Loading…
Reference in New Issue
Block a user