aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components')
-rw-r--r--ui/app/components/account-menu/index.js8
-rw-r--r--ui/app/components/pages/create-account/import-account/json.js6
-rw-r--r--ui/app/components/pages/unlock.js13
-rw-r--r--ui/app/components/token-cell.js26
4 files changed, 34 insertions, 19 deletions
diff --git a/ui/app/components/account-menu/index.js b/ui/app/components/account-menu/index.js
index e9ae61735..2b371eedf 100644
--- a/ui/app/components/account-menu/index.js
+++ b/ui/app/components/account-menu/index.js
@@ -90,7 +90,7 @@ AccountMenu.prototype.render = function () {
toggleAccountMenu()
history.push(NEW_ACCOUNT_ROUTE)
},
- icon: h('img', { src: 'images/plus-btn-white.svg' }),
+ icon: h('img.account-menu__item-icon', { src: 'images/plus-btn-white.svg' }),
text: 'Create Account',
}),
h(Item, {
@@ -98,7 +98,7 @@ AccountMenu.prototype.render = function () {
toggleAccountMenu()
history.push(IMPORT_ACCOUNT_ROUTE)
},
- icon: h('img', { src: 'images/import-account.svg' }),
+ icon: h('img.account-menu__item-icon', { src: 'images/import-account.svg' }),
text: 'Import Account',
}),
h(Divider),
@@ -107,7 +107,7 @@ AccountMenu.prototype.render = function () {
toggleAccountMenu()
history.push(INFO_ROUTE)
},
- icon: h('img', { src: 'images/mm-info-icon.svg' }),
+ icon: h('img.account-menu__item-icon', { src: 'images/mm-info-icon.svg' }),
text: 'Info & Help',
}),
h(Item, {
@@ -115,7 +115,7 @@ AccountMenu.prototype.render = function () {
toggleAccountMenu()
history.push(SETTINGS_ROUTE)
},
- icon: h('img', { src: 'images/settings.svg' }),
+ icon: h('img.account-menu__item-icon', { src: 'images/settings.svg' }),
text: 'Settings',
}),
])
diff --git a/ui/app/components/pages/create-account/import-account/json.js b/ui/app/components/pages/create-account/import-account/json.js
index 36644f1a0..703dbc1f4 100644
--- a/ui/app/components/pages/create-account/import-account/json.js
+++ b/ui/app/components/pages/create-account/import-account/json.js
@@ -87,6 +87,12 @@ JsonImportSubview.prototype.createKeyringOnEnter = function (event) {
JsonImportSubview.prototype.createNewKeychain = function () {
const state = this.state
+
+ if (!state) {
+ const message = 'You must select a valid file to import.'
+ return this.props.dispatch(actions.displayWarning(message))
+ }
+
const { fileContents } = state
if (!fileContents) {
diff --git a/ui/app/components/pages/unlock.js b/ui/app/components/pages/unlock.js
index 27e093a29..3d7a9091c 100644
--- a/ui/app/components/pages/unlock.js
+++ b/ui/app/components/pages/unlock.js
@@ -4,11 +4,11 @@ const { connect } = require('react-redux')
const h = require('react-hyperscript')
const { withRouter } = require('react-router-dom')
const { compose } = require('recompose')
-const { tryUnlockMetamask, forgotPassword } = require('../../actions')
+const { tryUnlockMetamask, forgotPassword, markPasswordForgotten } = require('../../actions')
const getCaretCoordinates = require('textarea-caret')
const EventEmitter = require('events').EventEmitter
const Mascot = require('../mascot')
-const { DEFAULT_ROUTE, RESTORE_VAULT_ROUTE } = require('../../routes')
+const { DEFAULT_ROUTE } = require('../../routes')
class UnlockScreen extends Component {
constructor (props) {
@@ -77,7 +77,7 @@ class UnlockScreen extends Component {
render () {
const { error } = this.state
- const { history } = this.props
+ const { markPasswordForgotten } = this.props
return (
h('.unlock-page.main-container', [
@@ -128,7 +128,10 @@ class UnlockScreen extends Component {
h('.flex-row.flex-center.flex-grow', [
h('p.pointer', {
- onClick: () => history.push(RESTORE_VAULT_ROUTE),
+ onClick: () => {
+ markPasswordForgotten()
+ global.platform.openExtensionInBrowser()
+ },
style: {
fontSize: '0.8em',
color: 'rgb(247, 134, 28)',
@@ -146,6 +149,7 @@ class UnlockScreen extends Component {
UnlockScreen.propTypes = {
forgotPassword: PropTypes.func,
tryUnlockMetamask: PropTypes.func,
+ markPasswordForgotten: PropTypes.func,
history: PropTypes.object,
isUnlocked: PropTypes.bool,
}
@@ -161,6 +165,7 @@ const mapDispatchToProps = dispatch => {
return {
forgotPassword: () => dispatch(forgotPassword()),
tryUnlockMetamask: password => dispatch(tryUnlockMetamask(password)),
+ markPasswordForgotten: () => dispatch(markPasswordForgotten()),
}
}
diff --git a/ui/app/components/token-cell.js b/ui/app/components/token-cell.js
index 59552f4a0..0332fde88 100644
--- a/ui/app/components/token-cell.js
+++ b/ui/app/components/token-cell.js
@@ -111,20 +111,24 @@ TokenCell.prototype.render = function () {
network,
}),
- h('h.token-list-item__balance-wrapper', null, [
- h('h3.token-list-item__token-balance', `${string || 0} ${symbol}`),
+ h('div.token-list-item__balance-ellipsis', null, [
+ h('div.token-list-item__balance-wrapper', null, [
+ h('h3.token-list-item__token-balance', `${string || 0} ${symbol}`),
+
+ showFiat && h('div.token-list-item__fiat-amount', {
+ style: {},
+ }, formattedFiat),
+ ]),
+
+ h('i.fa.fa-ellipsis-h.fa-lg.token-list-item__ellipsis.cursor-pointer', {
+ onClick: (e) => {
+ e.stopPropagation()
+ this.setState({ tokenMenuOpen: true })
+ },
+ }),
- showFiat && h('div.token-list-item__fiat-amount', {
- style: {},
- }, formattedFiat),
]),
- h('i.fa.fa-ellipsis-h.fa-lg.token-list-item__ellipsis.cursor-pointer', {
- onClick: (e) => {
- e.stopPropagation()
- this.setState({ tokenMenuOpen: true })
- },
- }),
tokenMenuOpen && h(TokenMenuDropdown, {
onClose: () => this.setState({ tokenMenuOpen: false }),