aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/unlock.js
diff options
context:
space:
mode:
authorFrankie <frankie.pangilinan@consensys.net>2016-06-22 06:04:00 +0800
committerFrankie <frankie.pangilinan@consensys.net>2016-06-22 06:04:00 +0800
commitcf663f1104697440121d32cc6db2a8a1d5d54c5a (patch)
tree3ed4b8b9fe8c85f3b3a5bf68482c3fb9967f2de5 /ui/app/unlock.js
parent265725c6edd62a7f46a9b9cf5a443cf01f0ff00c (diff)
parentdc2ef967028723afe9fe1efd669754723e38a4f0 (diff)
downloadtangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.tar.gz
tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.tar.zst
tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.zip
Fix conflict
Diffstat (limited to 'ui/app/unlock.js')
-rw-r--r--ui/app/unlock.js21
1 files changed, 10 insertions, 11 deletions
diff --git a/ui/app/unlock.js b/ui/app/unlock.js
index 687bb5e52..a7896d640 100644
--- a/ui/app/unlock.js
+++ b/ui/app/unlock.js
@@ -9,20 +9,19 @@ const EventEmitter = require('events').EventEmitter
module.exports = connect(mapStateToProps)(UnlockScreen)
-
inherits(UnlockScreen, Component)
-function UnlockScreen() {
+function UnlockScreen () {
Component.call(this)
this.animationEventEmitter = new EventEmitter()
}
-function mapStateToProps(state) {
+function mapStateToProps (state) {
return {
warning: state.appState.warning,
}
}
-UnlockScreen.prototype.render = function() {
+UnlockScreen.prototype.render = function () {
const state = this.props
const warning = state.warning
return (
@@ -55,7 +54,7 @@ UnlockScreen.prototype.render = function() {
h('.error', {
style: {
display: warning ? 'block' : 'none',
- }
+ },
}, warning),
h('button.primary.cursor-pointer', {
@@ -70,23 +69,23 @@ UnlockScreen.prototype.render = function() {
)
}
-UnlockScreen.prototype.componentDidMount = function(){
+UnlockScreen.prototype.componentDidMount = function () {
document.getElementById('password-box').focus()
}
-UnlockScreen.prototype.onSubmit = function(event) {
+UnlockScreen.prototype.onSubmit = function (event) {
const input = document.getElementById('password-box')
const password = input.value
this.props.dispatch(actions.tryUnlockMetamask(password))
}
-UnlockScreen.prototype.onKeyPress = function(event) {
+UnlockScreen.prototype.onKeyPress = function (event) {
if (event.key === 'Enter') {
this.submitPassword(event)
}
}
-UnlockScreen.prototype.submitPassword = function(event){
+UnlockScreen.prototype.submitPassword = function (event) {
var element = event.target
var password = element.value
// reset input
@@ -94,7 +93,7 @@ UnlockScreen.prototype.submitPassword = function(event){
this.props.dispatch(actions.tryUnlockMetamask(password))
}
-UnlockScreen.prototype.inputChanged = function(event){
+UnlockScreen.prototype.inputChanged = function (event) {
// tell mascot to look at page action
var element = event.target
var boundingRect = element.getBoundingClientRect()
@@ -105,6 +104,6 @@ UnlockScreen.prototype.inputChanged = function(event){
})
}
-UnlockScreen.prototype.emitAnim = function(name, a, b, c){
+UnlockScreen.prototype.emitAnim = function (name, a, b, c) {
this.animationEventEmitter.emit(name, a, b, c)
}