Change style on back button to be more like the rest of the app

feature/default_network_editable
Frankie 8 years ago
parent 4c46997c4a
commit 250cf8cc23
  1. 62
      ui/app/app.js

@ -299,28 +299,24 @@ App.prototype.renderDropdown = function () {
App.prototype.renderBackToInitButton = function () { App.prototype.renderBackToInitButton = function () {
var props = this.props var props = this.props
var button = null var button = null
var backButton = h('.flex-row', { var backButton = function (style, justArrow = false) {
return (
h('.flex-row', {
key: 'leftArrow', key: 'leftArrow',
transForward: false, transForward: false,
style: { style: style,
position: 'absolute', onClick: () => props.dispatch(actions.goBackToInitView()),
bottom: '10px',
left: '8px',
fontSize: '21px',
fontFamily: 'Montserrat Light',
color: '#7F8082',
width: '71.969px',
alignItems: 'flex-end',
},
}, [ }, [
h('i.fa.fa-arrow-left.cursor-pointer'), h('i.fa.fa-arrow-left.cursor-pointer'),
h('div.cursor-pointer', { justArrow ? null : h('div.cursor-pointer', {
style: { style: {
marginLeft: '3px', marginLeft: '3px',
}, },
onClick: () => props.dispatch(actions.goBackToInitView()), onClick: () => props.dispatch(actions.goBackToInitView()),
}, 'Back'), }, 'BACK'),
]) ])
)
}
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', {
@ -328,7 +324,7 @@ App.prototype.renderBackToInitButton = function () {
style: { style: {
position: 'absolute', position: 'absolute',
bottom: '10px', bottom: '10px',
right: '8px', right: '15px',
fontSize: '21px', fontSize: '21px',
fontFamily: 'Montserrat Light', fontFamily: 'Montserrat Light',
color: '#7F8082', color: '#7F8082',
@ -341,11 +337,45 @@ App.prototype.renderBackToInitButton = function () {
marginRight: '3px', marginRight: '3px',
}, },
onClick: () => props.dispatch(actions.backToUnlockView()), onClick: () => props.dispatch(actions.backToUnlockView()),
}, 'Login'), }, 'LOGIN'),
h('i.fa.fa-arrow-right.cursor-pointer'), h('i.fa.fa-arrow-right.cursor-pointer'),
]) : null ]) : null
} else if (props.isInitialized) { } else if (props.isInitialized) {
button = backButton var style
switch (props.currentView.name) {
case 'createVault':
style = {
position: 'absolute',
top: '41px',
left: '80px',
fontSize: '21px',
fontFamily: 'Montserrat Bold',
color: 'rgb(174, 174, 174)',
}
return backButton(style, true)
case 'restoreVault':
style = {
position: 'absolute',
top: '41px',
left: '70px',
fontSize: '21px',
fontFamily: 'Montserrat Bold',
color: 'rgb(174, 174, 174)',
}
return backButton(style, true)
default:
style = {
position: 'absolute',
bottom: '10px',
left: '15px',
fontSize: '21px',
fontFamily: 'Montserrat Light',
color: '#7F8082',
width: '71.969px',
alignItems: 'flex-end',
}
return backButton(style)
}
} }
} }
return button return button

Loading…
Cancel
Save