aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/unlock.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-06-22 04:18:32 +0800
committerDan Finlay <dan@danfinlay.com>2016-06-22 04:18:32 +0800
commita08c3bc01b11fbd0e3a243359befbe9fc909edf4 (patch)
treeb79b7324139945c429ca4b6c74715d8040fdf4e1 /ui/app/unlock.js
parentf7f8f8b1c50be39db22a7b10c6c6db007fe590aa (diff)
downloadtangerine-wallet-browser-a08c3bc01b11fbd0e3a243359befbe9fc909edf4.tar.gz
tangerine-wallet-browser-a08c3bc01b11fbd0e3a243359befbe9fc909edf4.tar.zst
tangerine-wallet-browser-a08c3bc01b11fbd0e3a243359befbe9fc909edf4.zip
Auto linted
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)
}