mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
ui ready
This commit is contained in:
parent
2ea05e303d
commit
285814646f
@ -920,10 +920,13 @@
|
|||||||
"message": "Select an Account"
|
"message": "Select an Account"
|
||||||
},
|
},
|
||||||
"selectAnAccountHelp": {
|
"selectAnAccountHelp": {
|
||||||
"message": "These are the accounts available in your hardware wallet. Select the one you’d like to use in MetaMask."
|
"message": "Select the account to view in MetaMask"
|
||||||
|
},
|
||||||
|
"selectHdPath": {
|
||||||
|
"message": "Select HD Path"
|
||||||
},
|
},
|
||||||
"selectPathHelp": {
|
"selectPathHelp": {
|
||||||
"message": "If you don't see your existing Ledger address(es), please try selecting a different HD Path \"Legacy (MEW / MyCrypto)\""
|
"message": "If you don't see your existing Ledger accounts below, try switching paths to \"Legacy (MEW / MyCrypto)\""
|
||||||
},
|
},
|
||||||
"sendTokensAnywhere": {
|
"sendTokensAnywhere": {
|
||||||
"message": "Send Tokens to anyone with an Ethereum account"
|
"message": "Send Tokens to anyone with an Ethereum account"
|
||||||
|
@ -40,8 +40,9 @@ class AccountList extends Component {
|
|||||||
|
|
||||||
const options = this.getHdPaths()
|
const options = this.getHdPaths()
|
||||||
return h('div', [
|
return h('div', [
|
||||||
|
h('h3.hw-connect__hdPath__title', {}, this.context.t('selectHdPath')),
|
||||||
|
h('p.hw-connect__msg', {}, this.context.t('selectPathHelp')),
|
||||||
h('div.hw-connect__hdPath', [
|
h('div.hw-connect__hdPath', [
|
||||||
h('h3.hw-connect__hdPath__title', {}, `HD Path`),
|
|
||||||
h(Select, {
|
h(Select, {
|
||||||
className: 'hw-connect__hdPath__select',
|
className: 'hw-connect__hdPath__select',
|
||||||
name: 'hd-path-select',
|
name: 'hd-path-select',
|
||||||
@ -53,18 +54,23 @@ class AccountList extends Component {
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
]),
|
]),
|
||||||
h('p.hw-connect__msg', {}, this.context.t('selectPathHelp')),
|
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
capitalizeDevice (device) {
|
||||||
|
return device.slice(0, 1).toUpperCase() + device.slice(1)
|
||||||
|
}
|
||||||
|
|
||||||
renderHeader () {
|
renderHeader () {
|
||||||
const { device } = this.props
|
const { device } = this.props
|
||||||
return (
|
return (
|
||||||
h('div.hw-connect', [
|
h('div.hw-connect', [
|
||||||
|
|
||||||
h('h3.hw-connect__title', {}, `${device.toUpperCase()} - ${this.context.t('selectAnAccount')}`),
|
h('h3.hw-connect__unlock-title', {}, `${this.context.t('unlock')} ${this.capitalizeDevice(device)}`),
|
||||||
|
|
||||||
device.toLowerCase() === 'ledger' ? this.renderHdPathSelector() : null,
|
device.toLowerCase() === 'ledger' ? this.renderHdPathSelector() : null,
|
||||||
|
|
||||||
|
h('h3.hw-connect__hdPath__title', {}, this.context.t('selectAnAccount')),
|
||||||
h('p.hw-connect__msg', {}, this.context.t('selectAnAccountHelp')),
|
h('p.hw-connect__msg', {}, this.context.t('selectAnAccountHelp')),
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
|
@ -118,8 +118,18 @@ WalletView.prototype.render = function () {
|
|||||||
return kr.accounts.includes(selectedAddress)
|
return kr.accounts.includes(selectedAddress)
|
||||||
})
|
})
|
||||||
|
|
||||||
const type = keyring.type
|
let label = ''
|
||||||
const isLoose = type !== 'HD Key Tree'
|
let type
|
||||||
|
if (keyring) {
|
||||||
|
type = keyring.type
|
||||||
|
if (type !== 'HD Key Tree') {
|
||||||
|
if (type.toLowerCase().search('hardware') !== -1) {
|
||||||
|
label = this.context.t('hardware')
|
||||||
|
} else {
|
||||||
|
label = this.context.t('imported')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return h('div.wallet-view.flex-column' + (responsiveDisplayClassname || ''), {
|
return h('div.wallet-view.flex-column' + (responsiveDisplayClassname || ''), {
|
||||||
style: {},
|
style: {},
|
||||||
@ -133,7 +143,7 @@ WalletView.prototype.render = function () {
|
|||||||
onClick: hideSidebar,
|
onClick: hideSidebar,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
h('div.wallet-view__keyring-label.allcaps', isLoose ? this.context.t('imported') : ''),
|
h('div.wallet-view__keyring-label.allcaps', label),
|
||||||
|
|
||||||
h('div.flex-column.flex-center.wallet-view__name-container', {
|
h('div.flex-column.flex-center.wallet-view__name-container', {
|
||||||
style: { margin: '0 auto' },
|
style: { margin: '0 auto' },
|
||||||
|
@ -162,6 +162,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hw-connect {
|
.hw-connect {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
&__header {
|
&__header {
|
||||||
&__title {
|
&__title {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
@ -241,7 +243,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 30px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|
||||||
&__title {
|
&__title {
|
||||||
@ -279,6 +281,13 @@
|
|||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__unlock-title {
|
||||||
|
padding-top: 10px;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 22px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
&__msg {
|
&__msg {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #9b9b9b;
|
color: #9b9b9b;
|
||||||
@ -291,8 +300,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&__footer {
|
&__footer {
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
&__title {
|
&__title {
|
||||||
padding-top: 15px;
|
padding-top: 15px;
|
||||||
padding-bottom: 12px;
|
padding-bottom: 12px;
|
||||||
@ -306,6 +313,9 @@
|
|||||||
color: #9b9b9b;
|
color: #9b9b9b;
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
margin-bottom: 27px;
|
margin-bottom: 27px;
|
||||||
|
width: 100%;
|
||||||
|
display: block;
|
||||||
|
margin-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__link {
|
&__link {
|
||||||
@ -468,6 +478,8 @@
|
|||||||
|
|
||||||
&.account-list {
|
&.account-list {
|
||||||
height: auto;
|
height: auto;
|
||||||
|
padding-left: 20px;
|
||||||
|
padding-right: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__buttons {
|
&__buttons {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user