|
|
@ -28,83 +28,72 @@ UnlockScreen.prototype.render = function () { |
|
|
|
const state = this.props |
|
|
|
const state = this.props |
|
|
|
const warning = state.warning |
|
|
|
const warning = state.warning |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
h('.flex-column', { |
|
|
|
h('.unlock-screen', [ |
|
|
|
style: { |
|
|
|
|
|
|
|
width: 'inherit', |
|
|
|
h(Mascot, { |
|
|
|
}, |
|
|
|
animationEventEmitter: this.animationEventEmitter, |
|
|
|
}, [ |
|
|
|
}), |
|
|
|
h('.unlock-screen.flex-column.flex-center.flex-grow', [ |
|
|
|
|
|
|
|
|
|
|
|
h('h1', { |
|
|
|
h(Mascot, { |
|
|
|
style: { |
|
|
|
animationEventEmitter: this.animationEventEmitter, |
|
|
|
fontSize: '1.4em', |
|
|
|
}), |
|
|
|
textTransform: 'uppercase', |
|
|
|
|
|
|
|
color: '#7F8082', |
|
|
|
h('h1', { |
|
|
|
}, |
|
|
|
style: { |
|
|
|
}, 'MetaMask'), |
|
|
|
fontSize: '1.4em', |
|
|
|
|
|
|
|
textTransform: 'uppercase', |
|
|
|
h('input.large-input', { |
|
|
|
color: '#7F8082', |
|
|
|
type: 'password', |
|
|
|
}, |
|
|
|
id: 'password-box', |
|
|
|
}, 'MetaMask'), |
|
|
|
placeholder: 'enter password', |
|
|
|
|
|
|
|
style: { |
|
|
|
h('input.large-input', { |
|
|
|
background: 'white', |
|
|
|
type: 'password', |
|
|
|
}, |
|
|
|
id: 'password-box', |
|
|
|
onKeyPress: this.onKeyPress.bind(this), |
|
|
|
placeholder: 'enter password', |
|
|
|
onInput: this.inputChanged.bind(this), |
|
|
|
style: { |
|
|
|
}), |
|
|
|
background: 'white', |
|
|
|
|
|
|
|
}, |
|
|
|
h('.error', { |
|
|
|
onKeyPress: this.onKeyPress.bind(this), |
|
|
|
style: { |
|
|
|
onInput: this.inputChanged.bind(this), |
|
|
|
display: warning ? 'block' : 'none', |
|
|
|
}), |
|
|
|
padding: '0 20px', |
|
|
|
|
|
|
|
textAlign: 'center', |
|
|
|
h('.error', { |
|
|
|
}, |
|
|
|
style: { |
|
|
|
}, warning), |
|
|
|
display: warning ? 'block' : 'none', |
|
|
|
|
|
|
|
padding: '0 20px', |
|
|
|
h('button.primary.cursor-pointer', { |
|
|
|
textAlign: 'center', |
|
|
|
onClick: this.onSubmit.bind(this), |
|
|
|
}, |
|
|
|
style: { |
|
|
|
}, warning), |
|
|
|
margin: 10, |
|
|
|
|
|
|
|
}, |
|
|
|
h('button.primary.cursor-pointer', { |
|
|
|
}, 'Log In'), |
|
|
|
onClick: this.onSubmit.bind(this), |
|
|
|
|
|
|
|
style: { |
|
|
|
h('p.pointer', { |
|
|
|
margin: 10, |
|
|
|
onClick: () => { |
|
|
|
}, |
|
|
|
this.props.dispatch(actions.markPasswordForgotten()) |
|
|
|
}, 'Log In'), |
|
|
|
if (environmentType() === 'popup') { |
|
|
|
]), |
|
|
|
global.platform.openExtensionInBrowser() |
|
|
|
|
|
|
|
} |
|
|
|
h('.flex-row.flex-center.flex-grow', [ |
|
|
|
}, |
|
|
|
h('p.pointer', { |
|
|
|
style: { |
|
|
|
onClick: () => { |
|
|
|
fontSize: '0.8em', |
|
|
|
this.props.dispatch(actions.markPasswordForgotten()) |
|
|
|
color: 'rgb(247, 134, 28)', |
|
|
|
if (environmentType() === 'popup') { |
|
|
|
textDecoration: 'underline', |
|
|
|
global.platform.openExtensionInBrowser() |
|
|
|
}, |
|
|
|
} |
|
|
|
}, 'Restore from seed phrase'), |
|
|
|
}, |
|
|
|
|
|
|
|
style: { |
|
|
|
h('p.pointer', { |
|
|
|
fontSize: '0.8em', |
|
|
|
onClick: () => { |
|
|
|
color: 'rgb(247, 134, 28)', |
|
|
|
this.props.dispatch(actions.setFeatureFlag('betaUI', false, 'OLD_UI_NOTIFICATION_MODAL')) |
|
|
|
textDecoration: 'underline', |
|
|
|
.then(() => this.props.dispatch(actions.setNetworkEndpoints(OLD_UI_NETWORK_TYPE))) |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, 'Restore from seed phrase'), |
|
|
|
style: { |
|
|
|
]), |
|
|
|
fontSize: '0.8em', |
|
|
|
|
|
|
|
color: '#aeaeae', |
|
|
|
h('.flex-row.flex-center.flex-grow', [ |
|
|
|
textDecoration: 'underline', |
|
|
|
h('p.pointer', { |
|
|
|
marginTop: '32px', |
|
|
|
onClick: () => { |
|
|
|
}, |
|
|
|
this.props.dispatch(actions.setFeatureFlag('betaUI', false, 'OLD_UI_NOTIFICATION_MODAL')) |
|
|
|
}, 'Use classic interface'), |
|
|
|
.then(() => this.props.dispatch(actions.setNetworkEndpoints(OLD_UI_NETWORK_TYPE))) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
style: { |
|
|
|
|
|
|
|
fontSize: '0.8em', |
|
|
|
|
|
|
|
color: '#aeaeae', |
|
|
|
|
|
|
|
textDecoration: 'underline', |
|
|
|
|
|
|
|
marginTop: '32px', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, 'Use classic interface'), |
|
|
|
|
|
|
|
]), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
]) |
|
|
|
]) |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|