1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 02:10:12 +01:00

added tooltip

This commit is contained in:
brunobar79 2018-07-12 00:23:08 -04:00
parent 80e875308b
commit 2a0a785324
4 changed files with 17 additions and 6 deletions

View File

@ -740,7 +740,7 @@
"message": "remove" "message": "remove"
}, },
"removeAccount": { "removeAccount": {
"message": "Remove account?" "message": "Remove account"
}, },
"removeAccountDescription": { "removeAccountDescription": {
"message": "This account will be removed from your wallet. Please make sure you have the original seed phrase or private key for this imported account before continuing. You can import or create accounts again from the account drop-down. " "message": "This account will be removed from your wallet. Please make sure you have the original seed phrase or private key for this imported account before continuing. You can import or create accounts again from the account drop-down. "

View File

@ -11,6 +11,7 @@ const Identicon = require('../identicon')
const { formatBalance } = require('../../util') const { formatBalance } = require('../../util')
const { ENVIRONMENT_TYPE_POPUP } = require('../../../../app/scripts/lib/enums') const { ENVIRONMENT_TYPE_POPUP } = require('../../../../app/scripts/lib/enums')
const { getEnvironmentType } = require('../../../../app/scripts/lib/util') const { getEnvironmentType } = require('../../../../app/scripts/lib/util')
const Tooltip = require('../tooltip')
const { const {
@ -202,7 +203,17 @@ AccountMenu.prototype.renderRemoveAccount = function (keyring, address) {
// Any account that's not from the HD wallet Keyring can be removed // Any account that's not from the HD wallet Keyring can be removed
const type = keyring.type const type = keyring.type
const isRemovable = type !== 'HD Key Tree' const isRemovable = type !== 'HD Key Tree'
return isRemovable ? h('a.remove-account-icon', { onClick: (e) => this.removeAccount(e, address) }, '') : null if (isRemovable) {
return h(Tooltip, {
title: this.context.t('removeAccount'),
position: 'bottom',
}, [
h('a.remove-account-icon', {
onClick: (e) => this.removeAccount(e, address),
}, ''),
])
}
return null
} }
AccountMenu.prototype.removeAccount = function (e, address) { AccountMenu.prototype.removeAccount = function (e, address) {

View File

@ -26,7 +26,7 @@ class ConfirmRemoveAccount extends Component {
<div className="modal-container"> <div className="modal-container">
<div className="modal-container__content"> <div className="modal-container__content">
<div className="modal-container__title"> <div className="modal-container__title">
{ `${t('removeAccount')}` } { `${t('removeAccount')}` }?
</div> </div>
<div className="modal-container__address"> <div className="modal-container__address">
{addressSummary(this.props.address)} {addressSummary(this.props.address)}

View File

@ -87,9 +87,9 @@
} }
.remove-account-icon { .remove-account-icon {
width: 25px; width: 15px;
padding-left: 10px; margin-left: 10px;
height: 25px; height: 15px;
} }
&:hover { &:hover {