aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-11-02 06:00:28 +0800
committerDan Finlay <dan@danfinlay.com>2016-11-02 06:00:28 +0800
commit72729060dc8366dbe965bd66c3b98b88bdb21830 (patch)
tree33b9dff55ca925dda06a6d5b046187bf188de129 /ui
parent14ad58eef13eb3ba8e9ab540d710e9b9f659ab8c (diff)
downloadtangerine-wallet-browser-72729060dc8366dbe965bd66c3b98b88bdb21830.tar
tangerine-wallet-browser-72729060dc8366dbe965bd66c3b98b88bdb21830.tar.gz
tangerine-wallet-browser-72729060dc8366dbe965bd66c3b98b88bdb21830.tar.bz2
tangerine-wallet-browser-72729060dc8366dbe965bd66c3b98b88bdb21830.tar.lz
tangerine-wallet-browser-72729060dc8366dbe965bd66c3b98b88bdb21830.tar.xz
tangerine-wallet-browser-72729060dc8366dbe965bd66c3b98b88bdb21830.tar.zst
tangerine-wallet-browser-72729060dc8366dbe965bd66c3b98b88bdb21830.zip
Make forgot password button.
Diffstat (limited to 'ui')
-rw-r--r--ui/app/app.js41
-rw-r--r--ui/app/first-time/init-menu.js3
-rw-r--r--ui/app/unlock.js11
3 files changed, 23 insertions, 32 deletions
diff --git a/ui/app/app.js b/ui/app/app.js
index b40219763..4b1818b93 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -300,6 +300,7 @@ App.prototype.renderDropdown = function () {
}),
])
}
+
App.prototype.renderBackButton = function (style, justArrow = false) {
var props = this.props
return (
@@ -317,12 +318,13 @@ App.prototype.renderBackButton = function (style, justArrow = false) {
}, 'BACK'),
])
)
-
}
+
App.prototype.renderBackToInitButton = function () {
var props = this.props
var button = null
if (!props.isConfirmed) return button
+
if (!props.isUnlocked) {
if (props.currentView.name === 'InitMenu') {
button = props.forgottenPassword ? h('.flex-row', {
@@ -346,32 +348,6 @@ App.prototype.renderBackToInitButton = function () {
}, 'LOGIN'),
h('i.fa.fa-arrow-right.cursor-pointer'),
]) : null
- } else if (props.isInitialized) {
- var style
- switch (props.currentView.name) {
- case 'restoreVault':
- style = {
- position: 'absolute',
- top: '41px',
- left: '70px',
- fontSize: '21px',
- fontFamily: 'Montserrat Bold',
- color: 'rgb(174, 174, 174)',
- }
- return this.renderBackButton(style, true)
- default:
- style = {
- position: 'absolute',
- bottom: '10px',
- left: '15px',
- fontSize: '21px',
- fontFamily: 'Montserrat Light',
- color: '#7F8082',
- width: '71.969px',
- alignItems: 'flex-end',
- }
- return this.renderBackButton(style)
- }
}
}
return button
@@ -399,17 +375,24 @@ App.prototype.renderPrimary = function () {
default:
return h(InitializeMenuScreen, {key: 'menuScreenInit'})
-
}
}
// show unlock screen
if (!props.isUnlocked) {
- return h(UnlockScreen, {key: 'locked'})
+ switch (props.currentView.name) {
+
+ case 'restoreVault':
+ return h(HDRestoreVaultScreen, {key: 'HDRestoreVaultScreen'})
+
+ default:
+ return h(UnlockScreen, {key: 'locked'})
+ }
}
// show current view
switch (props.currentView.name) {
+
case 'accounts':
return h(AccountsScreen, {key: 'accounts'})
diff --git a/ui/app/first-time/init-menu.js b/ui/app/first-time/init-menu.js
index 897051818..14a89b988 100644
--- a/ui/app/first-time/init-menu.js
+++ b/ui/app/first-time/init-menu.js
@@ -117,8 +117,6 @@ InitializeMenuScreen.prototype.renderMenu = function (state) {
},
}, 'Create'),
-
-
h('.flex-row.flex-center.flex-grow', [
h('p.pointer', {
onClick: this.showRestoreVault.bind(this),
@@ -130,7 +128,6 @@ InitializeMenuScreen.prototype.renderMenu = function (state) {
}, 'I already have a DEN that I would like to import'),
]),
-
])
)
}
diff --git a/ui/app/unlock.js b/ui/app/unlock.js
index ca74c94c3..5c9a94f39 100644
--- a/ui/app/unlock.js
+++ b/ui/app/unlock.js
@@ -65,6 +65,17 @@ UnlockScreen.prototype.render = function () {
},
}, 'Unlock'),
]),
+
+ h('.flex-row.flex-center.flex-grow', [
+ h('p.pointer', {
+ onClick: () => this.props.dispatch(actions.showRestoreVault()),
+ style: {
+ fontSize: '0.8em',
+ color: 'rgb(247, 134, 28)',
+ textDecoration: 'underline',
+ },
+ }, 'I forgot my password.'),
+ ]),
])
)
}