aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/modals
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/modals')
-rw-r--r--ui/app/components/modals/account-details-modal.js21
-rw-r--r--ui/app/components/modals/buy-options-modal.js4
-rw-r--r--ui/app/components/modals/export-private-key-modal.js5
-rw-r--r--ui/app/components/modals/modal.js7
-rw-r--r--ui/app/components/modals/new-account-modal.js16
5 files changed, 30 insertions, 23 deletions
diff --git a/ui/app/components/modals/account-details-modal.js b/ui/app/components/modals/account-details-modal.js
index 37a62e1c0..e3c936702 100644
--- a/ui/app/components/modals/account-details-modal.js
+++ b/ui/app/components/modals/account-details-modal.js
@@ -7,6 +7,7 @@ const AccountModalContainer = require('./account-modal-container')
const { getSelectedIdentity, getSelectedAddress } = require('../../selectors')
const genAccountLink = require('../../../lib/account-link.js')
const QrView = require('../qr-code')
+const EditableLabel = require('../editable-label')
function mapStateToProps (state) {
return {
@@ -23,6 +24,7 @@ function mapDispatchToProps (dispatch) {
dispatch(actions.showModal({ name: 'EXPORT_PRIVATE_KEY' }))
},
hideModal: () => dispatch(actions.hideModal()),
+ saveAccountLabel: (address, label) => dispatch(actions.saveAccountLabel(address, label)),
}
}
@@ -41,14 +43,19 @@ AccountDetailsModal.prototype.render = function () {
selectedIdentity,
network,
showExportPrivateKeyModal,
- hideModal,
+ saveAccountLabel,
} = this.props
const { name, address } = selectedIdentity
return h(AccountModalContainer, {}, [
+ h(EditableLabel, {
+ className: 'account-modal__name',
+ defaultValue: name,
+ onSubmit: label => saveAccountLabel(address, label),
+ }),
+
h(QrView, {
Qr: {
- message: name,
data: address,
},
}),
@@ -57,14 +64,12 @@ AccountDetailsModal.prototype.render = function () {
h('button.btn-clear', {
onClick: () => global.platform.openWindow({ url: genAccountLink(address, network) }),
- }, [ 'View account on Etherscan' ]),
+ }, 'View account on Etherscan'),
// Holding on redesign for Export Private Key functionality
h('button.btn-clear', {
- onClick: () => {
- showExportPrivateKeyModal()
- },
- }, [ 'Export private key' ]),
-
+ onClick: () => showExportPrivateKeyModal(),
+ }, 'Export private key'),
+
])
}
diff --git a/ui/app/components/modals/buy-options-modal.js b/ui/app/components/modals/buy-options-modal.js
index f1a5aa9fd..33615c483 100644
--- a/ui/app/components/modals/buy-options-modal.js
+++ b/ui/app/components/modals/buy-options-modal.js
@@ -42,7 +42,7 @@ BuyOptions.prototype.render = function () {
h('div.buy-modal-content-title', {
style: {},
}, 'Transfers'),
- h('div', {}, 'How would you like to buy Ether?'),
+ h('div', {}, 'How would you like to deposit Ether?'),
]),
h('div.buy-modal-content-options.flex-column.flex-center', {}, [
@@ -54,7 +54,7 @@ BuyOptions.prototype.render = function () {
},
}, [
h('div.buy-modal-content-option-title', {}, 'Coinbase'),
- h('div.buy-modal-content-option-subtitle', {}, 'Buy with Fiat'),
+ h('div.buy-modal-content-option-subtitle', {}, 'Deposit with Fiat'),
]),
// h('div.buy-modal-content-option', {}, [
diff --git a/ui/app/components/modals/export-private-key-modal.js b/ui/app/components/modals/export-private-key-modal.js
index 302596eda..2d8470634 100644
--- a/ui/app/components/modals/export-private-key-modal.js
+++ b/ui/app/components/modals/export-private-key-modal.js
@@ -66,7 +66,6 @@ ExportPrivateKeyModal.prototype.renderPasswordInput = function (privateKey) {
})
: h('input.private-key-password-input', {
type: 'password',
- placeholder: 'Type password',
onChange: event => this.setState({ password: event.target.value }),
})
}
@@ -84,7 +83,7 @@ ExportPrivateKeyModal.prototype.renderButtons = function (privateKey, password,
(privateKey
? this.renderButton('btn-clear', () => hideModal(), 'Done')
- : this.renderButton('btn-clear', () => this.exportAccountAndGetPrivateKey(this.state.password, address), 'Download')
+ : this.renderButton('btn-clear', () => this.exportAccountAndGetPrivateKey(this.state.password, address), 'Show')
),
])
@@ -118,7 +117,7 @@ ExportPrivateKeyModal.prototype.render = function () {
h('div.account-modal-divider'),
- h('span.modal-body-title', 'Download Private Keys'),
+ h('span.modal-body-title', 'Show Private Keys'),
h('div.private-key-password', {}, [
this.renderPasswordLabel(privateKey),
diff --git a/ui/app/components/modals/modal.js b/ui/app/components/modals/modal.js
index 88deb2bb0..e15dd6c1b 100644
--- a/ui/app/components/modals/modal.js
+++ b/ui/app/components/modals/modal.js
@@ -162,10 +162,9 @@ const MODALS = {
h(CustomizeGasModal, {}, []),
],
mobileModalStyle: {
- width: '355px',
- height: '598px',
- // top: isPopupOrNotification() === 'popup' ? '52vh' : '36.5vh',
- top: '5%',
+ width: '100vw',
+ height: '100vh',
+ top: '0',
transform: 'none',
left: '0',
right: '0',
diff --git a/ui/app/components/modals/new-account-modal.js b/ui/app/components/modals/new-account-modal.js
index 25beb6745..b78de1d8d 100644
--- a/ui/app/components/modals/new-account-modal.js
+++ b/ui/app/components/modals/new-account-modal.js
@@ -28,6 +28,7 @@ function mapDispatchToProps (dispatch) {
dispatch(actions.hideModal())
})
},
+ showImportPage: () => dispatch(actions.showImportPage()),
}
}
@@ -36,7 +37,7 @@ function NewAccountModal () {
Component.call(this)
this.state = {
- newAccountName: ''
+ newAccountName: '',
}
}
@@ -63,7 +64,7 @@ NewAccountModal.prototype.render = function () {
h('div.new-account-input-wrapper', {}, [
h('input.new-account-input', {
placeholder: 'E.g. My new account',
- onChange: (event) => this.setState({ newAccountName: event.target.value })
+ onChange: event => this.setState({ newAccountName: event.target.value }),
}, []),
]),
@@ -71,13 +72,16 @@ NewAccountModal.prototype.render = function () {
'or',
]),
- h('div.new-account-modal-content.after-input', {}, [
- 'Import an account',
- ]),
+ h('div.new-account-modal-content.after-input.pointer', {
+ onClick: () => {
+ this.props.hideModal()
+ this.props.showImportPage()
+ },
+ }, 'Import an account'),
h('div.new-account-modal-content.button', {}, [
h('button.btn-clear', {
- onClick: () => this.props.createAccount(newAccountName)
+ onClick: () => this.props.createAccount(newAccountName),
}, [
'SAVE',
]),