mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Make forgot password button.
This commit is contained in:
parent
14ad58eef1
commit
72729060dc
@ -300,6 +300,7 @@ App.prototype.renderDropdown = function () {
|
|||||||
}),
|
}),
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
App.prototype.renderBackButton = function (style, justArrow = false) {
|
App.prototype.renderBackButton = function (style, justArrow = false) {
|
||||||
var props = this.props
|
var props = this.props
|
||||||
return (
|
return (
|
||||||
@ -317,12 +318,13 @@ App.prototype.renderBackButton = function (style, justArrow = false) {
|
|||||||
}, 'BACK'),
|
}, 'BACK'),
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
App.prototype.renderBackToInitButton = function () {
|
App.prototype.renderBackToInitButton = function () {
|
||||||
var props = this.props
|
var props = this.props
|
||||||
var button = null
|
var button = null
|
||||||
if (!props.isConfirmed) return button
|
if (!props.isConfirmed) return button
|
||||||
|
|
||||||
if (!props.isUnlocked) {
|
if (!props.isUnlocked) {
|
||||||
if (props.currentView.name === 'InitMenu') {
|
if (props.currentView.name === 'InitMenu') {
|
||||||
button = props.forgottenPassword ? h('.flex-row', {
|
button = props.forgottenPassword ? h('.flex-row', {
|
||||||
@ -346,32 +348,6 @@ App.prototype.renderBackToInitButton = function () {
|
|||||||
}, 'LOGIN'),
|
}, 'LOGIN'),
|
||||||
h('i.fa.fa-arrow-right.cursor-pointer'),
|
h('i.fa.fa-arrow-right.cursor-pointer'),
|
||||||
]) : null
|
]) : 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
|
return button
|
||||||
@ -399,17 +375,24 @@ App.prototype.renderPrimary = function () {
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
return h(InitializeMenuScreen, {key: 'menuScreenInit'})
|
return h(InitializeMenuScreen, {key: 'menuScreenInit'})
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// show unlock screen
|
// show unlock screen
|
||||||
if (!props.isUnlocked) {
|
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
|
// show current view
|
||||||
switch (props.currentView.name) {
|
switch (props.currentView.name) {
|
||||||
|
|
||||||
case 'accounts':
|
case 'accounts':
|
||||||
return h(AccountsScreen, {key: 'accounts'})
|
return h(AccountsScreen, {key: 'accounts'})
|
||||||
|
|
||||||
|
@ -117,8 +117,6 @@ InitializeMenuScreen.prototype.renderMenu = function (state) {
|
|||||||
},
|
},
|
||||||
}, 'Create'),
|
}, 'Create'),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
h('.flex-row.flex-center.flex-grow', [
|
h('.flex-row.flex-center.flex-grow', [
|
||||||
h('p.pointer', {
|
h('p.pointer', {
|
||||||
onClick: this.showRestoreVault.bind(this),
|
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'),
|
}, 'I already have a DEN that I would like to import'),
|
||||||
]),
|
]),
|
||||||
|
|
||||||
|
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,17 @@ UnlockScreen.prototype.render = function () {
|
|||||||
},
|
},
|
||||||
}, 'Unlock'),
|
}, '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.'),
|
||||||
|
]),
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user