aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/first-time
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/first-time
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/first-time')
-rw-r--r--ui/app/first-time/create-vault-complete.js11
-rw-r--r--ui/app/first-time/create-vault.js17
-rw-r--r--ui/app/first-time/disclaimer.js13
-rw-r--r--ui/app/first-time/init-menu.js15
-rw-r--r--ui/app/first-time/restore-vault.js16
5 files changed, 33 insertions, 39 deletions
diff --git a/ui/app/first-time/create-vault-complete.js b/ui/app/first-time/create-vault-complete.js
index 9eceb4421..0ca0a1b22 100644
--- a/ui/app/first-time/create-vault-complete.js
+++ b/ui/app/first-time/create-vault-complete.js
@@ -6,20 +6,19 @@ const actions = require('../actions')
module.exports = connect(mapStateToProps)(CreateVaultCompleteScreen)
-
inherits(CreateVaultCompleteScreen, Component)
-function CreateVaultCompleteScreen() {
+function CreateVaultCompleteScreen () {
Component.call(this)
}
-function mapStateToProps(state) {
+function mapStateToProps (state) {
return {
seed: state.appState.currentView.seedWords,
cachedSeed: state.metamask.seedWords,
}
}
-CreateVaultCompleteScreen.prototype.render = function() {
+CreateVaultCompleteScreen.prototype.render = function () {
var state = this.props
var seed = state.seed || state.cachedSeed
@@ -50,7 +49,7 @@ CreateVaultCompleteScreen.prototype.render = function() {
style: {
padding: '12px 20px 0px 20px',
textAlign: 'center',
- }
+ },
}, 'These 12 words can restore all of your MetaMask accounts for this vault.\nSave them somewhere safe and secret.'),
h('textarea.twelve-word-phrase', {
@@ -68,7 +67,7 @@ CreateVaultCompleteScreen.prototype.render = function() {
)
}
-CreateVaultCompleteScreen.prototype.confirmSeedWords = function() {
+CreateVaultCompleteScreen.prototype.confirmSeedWords = function () {
this.props.dispatch(actions.confirmSeedWords())
}
diff --git a/ui/app/first-time/create-vault.js b/ui/app/first-time/create-vault.js
index 1e963aa5a..3dfbf0dbd 100644
--- a/ui/app/first-time/create-vault.js
+++ b/ui/app/first-time/create-vault.js
@@ -7,19 +7,18 @@ const actions = require('../actions')
module.exports = connect(mapStateToProps)(CreateVaultScreen)
-
inherits(CreateVaultScreen, Component)
-function CreateVaultScreen() {
+function CreateVaultScreen () {
Component.call(this)
}
-function mapStateToProps(state) {
+function mapStateToProps (state) {
return {
warning: state.appState.warning,
}
}
-CreateVaultScreen.prototype.render = function() {
+CreateVaultScreen.prototype.render = function () {
var state = this.props
return (
@@ -91,24 +90,24 @@ CreateVaultScreen.prototype.render = function() {
)
}
-CreateVaultScreen.prototype.componentDidMount = function(){
+CreateVaultScreen.prototype.componentDidMount = function () {
document.getElementById('password-box').focus()
}
-CreateVaultScreen.prototype.showInitializeMenu = function() {
+CreateVaultScreen.prototype.showInitializeMenu = function () {
this.props.dispatch(actions.showInitializeMenu())
}
// create vault
-CreateVaultScreen.prototype.createVaultOnEnter = function(event) {
+CreateVaultScreen.prototype.createVaultOnEnter = function (event) {
if (event.key === 'Enter') {
event.preventDefault()
this.createNewVault()
}
}
-CreateVaultScreen.prototype.createNewVault = function(){
+CreateVaultScreen.prototype.createNewVault = function () {
var passwordBox = document.getElementById('password-box')
var password = passwordBox.value
var passwordConfirmBox = document.getElementById('password-box-confirm')
@@ -126,5 +125,5 @@ CreateVaultScreen.prototype.createNewVault = function(){
return
}
- this.props.dispatch(actions.createNewVault(password, ''/*entropy*/))
+ this.props.dispatch(actions.createNewVault(password, ''/* entropy*/))
}
diff --git a/ui/app/first-time/disclaimer.js b/ui/app/first-time/disclaimer.js
index fe138c93b..bfd6c490d 100644
--- a/ui/app/first-time/disclaimer.js
+++ b/ui/app/first-time/disclaimer.js
@@ -8,17 +8,16 @@ const path = require('path')
const disclaimer = fs.readFileSync(path.join(__dirname, 'disclaimer.txt')).toString()
module.exports = connect(mapStateToProps)(DisclaimerScreen)
-function mapStateToProps(state) {
+function mapStateToProps (state) {
return {}
}
inherits(DisclaimerScreen, Component)
-function DisclaimerScreen() {
+function DisclaimerScreen () {
Component.call(this)
}
-DisclaimerScreen.prototype.render = function() {
-
+DisclaimerScreen.prototype.render = function () {
return (
h('.flex-column.flex-center.flex-grow', [
@@ -43,13 +42,13 @@ DisclaimerScreen.prototype.render = function() {
padding: '6px',
width: '80%',
overflowY: 'scroll',
- }
+ },
}, disclaimer),
h('button', {
style: { marginTop: '18px' },
- onClick: () => this.props.dispatch(actions.agreeToDisclaimer())
- }, 'I Agree')
+ onClick: () => this.props.dispatch(actions.agreeToDisclaimer()),
+ }, 'I Agree'),
])
)
}
diff --git a/ui/app/first-time/init-menu.js b/ui/app/first-time/init-menu.js
index 197193063..5fa6ec501 100644
--- a/ui/app/first-time/init-menu.js
+++ b/ui/app/first-time/init-menu.js
@@ -12,19 +12,19 @@ const CreateVaultCompleteScreen = require('./create-vault-complete')
module.exports = connect(mapStateToProps)(InitializeMenuScreen)
inherits(InitializeMenuScreen, Component)
-function InitializeMenuScreen() {
+function InitializeMenuScreen () {
Component.call(this)
this.animationEventEmitter = new EventEmitter()
}
-function mapStateToProps(state) {
+function mapStateToProps (state) {
return {
// state from plugin
currentView: state.appState.currentView,
}
}
-InitializeMenuScreen.prototype.render = function() {
+InitializeMenuScreen.prototype.render = function () {
var state = this.props
switch (state.currentView.name) {
@@ -33,14 +33,13 @@ InitializeMenuScreen.prototype.render = function() {
return this.renderMenu()
}
-
}
// InitializeMenuScreen.prototype.componentDidMount = function(){
// document.getElementById('password-box').focus()
// }
-InitializeMenuScreen.prototype.renderMenu = function() {
+InitializeMenuScreen.prototype.renderMenu = function () {
var state = this.props
return (
@@ -88,15 +87,15 @@ InitializeMenuScreen.prototype.renderMenu = function() {
// this.props.dispatch(actions.showInitializeMenu())
// }
-InitializeMenuScreen.prototype.showInitializeMenu = function() {
+InitializeMenuScreen.prototype.showInitializeMenu = function () {
this.props.dispatch(actions.showInitializeMenu())
}
-InitializeMenuScreen.prototype.showCreateVault = function() {
+InitializeMenuScreen.prototype.showCreateVault = function () {
this.props.dispatch(actions.showCreateVault())
}
-InitializeMenuScreen.prototype.showRestoreVault = function() {
+InitializeMenuScreen.prototype.showRestoreVault = function () {
this.props.dispatch(actions.showRestoreVault())
}
diff --git a/ui/app/first-time/restore-vault.js b/ui/app/first-time/restore-vault.js
index ff3b308c4..684781e50 100644
--- a/ui/app/first-time/restore-vault.js
+++ b/ui/app/first-time/restore-vault.js
@@ -6,20 +6,18 @@ const actions = require('../actions')
module.exports = connect(mapStateToProps)(RestoreVaultScreen)
-
inherits(RestoreVaultScreen, Component)
-function RestoreVaultScreen() {
+function RestoreVaultScreen () {
Component.call(this)
}
-function mapStateToProps(state) {
+function mapStateToProps (state) {
return {
warning: state.appState.warning,
}
}
-
-RestoreVaultScreen.prototype.render = function() {
+RestoreVaultScreen.prototype.render = function () {
var state = this.props
return (
@@ -41,7 +39,7 @@ RestoreVaultScreen.prototype.render = function() {
// wallet seed entry
h('h3', 'Wallet Seed'),
h('textarea.twelve-word-phrase.letter-spacey', {
- placeholder: 'Enter your secret twelve word phrase here to restore your vault.'
+ placeholder: 'Enter your secret twelve word phrase here to restore your vault.',
}),
// password
@@ -97,17 +95,17 @@ RestoreVaultScreen.prototype.render = function() {
)
}
-RestoreVaultScreen.prototype.showInitializeMenu = function() {
+RestoreVaultScreen.prototype.showInitializeMenu = function () {
this.props.dispatch(actions.showInitializeMenu())
}
-RestoreVaultScreen.prototype.onMaybeCreate = function(event) {
+RestoreVaultScreen.prototype.onMaybeCreate = function (event) {
if (event.key === 'Enter') {
this.restoreVault()
}
}
-RestoreVaultScreen.prototype.restoreVault = function(){
+RestoreVaultScreen.prototype.restoreVault = function () {
// check password
var passwordBox = document.getElementById('password-box')
var password = passwordBox.value