1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

update connect harwdware screen

This commit is contained in:
brunobar79 2018-07-06 20:04:20 -04:00
parent 7c9d942ba1
commit dddbb4250b
3 changed files with 34 additions and 9 deletions

View File

@ -140,6 +140,12 @@
"connectToTrezor": { "connectToTrezor": {
"message": "Connect to Trezor" "message": "Connect to Trezor"
}, },
"connectToTrezorHelp": {
"message": "Metamask is able to access your TREZOR ethereum accounts. First make sure your device is connected and unlocked."
},
"connectToTrezorTrouble": {
"message": "If you are having trouble, make sure you are using the latest version of the TREZOR firmware."
},
"continue": { "continue": {
"message": "Continue" "message": "Continue"
}, },
@ -944,6 +950,9 @@
"transfers": { "transfers": {
"message": "Transfers" "message": "Transfers"
}, },
"trezorHardwareWallet": {
"message": "TREZOR Hardware Wallet"
},
"troubleTokenBalances": { "troubleTokenBalances": {
"message": "We had trouble loading your token balances. You can view them ", "message": "We had trouble loading your token balances. You can view them ",
"description": "Followed by a link (here) to view token balances" "description": "Followed by a link (here) to view token balances"

View File

@ -10,9 +10,9 @@ class ConnectScreen extends Component {
renderUnsupportedBrowser () { renderUnsupportedBrowser () {
return ( return (
h('div', {}, [ h('div', {}, [
h('div.hw-unsupported-browser', [ h('div.hw-connect', [
h('h3.hw-unsupported-browser__title', {}, this.context.t('browserNotSupported')), h('h3.hw-connect__title', {}, this.context.t('browserNotSupported')),
h('p.hw-unsupported-browser__msg', {}, this.context.t('chromeRequiredForTrezor')), h('p.hw-connect__msg', {}, this.context.t('chromeRequiredForTrezor')),
]), ]),
h( h(
'button.btn-primary.btn--large', 'button.btn-primary.btn--large',
@ -25,18 +25,30 @@ class ConnectScreen extends Component {
) )
} }
renderConnectButton () { renderConnectScreen () {
return h( return (
h('div', {}, [
h('div.hw-connect', [
h('h3.hw-connect__title', {}, this.context.t('trezorHardwareWallet')),
h('p.hw-connect__msg', {}, this.context.t('connectToTrezorHelp')),
h('p.hw-connect__msg', {}, [
this.context.t('connectToTrezorTrouble'),
h('a.___info-link', { url: 'https://support.metamask.io/', target: '_blank'}, this.context.t('learnMore')),
]),
]),
h(
'button.btn-primary.btn--large', 'button.btn-primary.btn--large',
{ onClick: this.props.connectToTrezor.bind(this), style: { margin: 12 } }, { onClick: this.props.connectToTrezor.bind(this) },
this.props.btnText this.props.btnText
) ),
])
)
} }
render () { render () {
const isChrome = window.navigator.userAgent.search('Chrome') !== -1 const isChrome = window.navigator.userAgent.search('Chrome') !== -1
if (isChrome) { if (isChrome) {
return this.renderConnectButton() return this.renderConnectScreen()
} }
return this.renderUnsupportedBrowser() return this.renderUnsupportedBrowser()
} }

View File

@ -153,7 +153,7 @@
} }
} }
.hw-unsupported-browser { .hw-connect {
&__title { &__title {
padding-top: 10px; padding-top: 10px;
} }
@ -164,6 +164,10 @@
margin-top: 15px; margin-top: 15px;
margin-bottom: 15px; margin-bottom: 15px;
} }
&__info-link {
color: #2f9ae0;
}
} }
.hw-account-list { .hw-account-list {