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