Skip to content

Commit

Permalink
Merge pull request LedgerHQ#1961 from valpinkman/feat/usb-only-nanox-…
Browse files Browse the repository at this point in the history
…onboarding

adds usb only to nano x in onboarding
  • Loading branch information
gre committed Apr 30, 2019
2 parents 61fb585 + a35f7fe commit c48552d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
26 changes: 24 additions & 2 deletions src/components/Onboarding/steps/SelectDevice.js
Expand Up @@ -3,6 +3,7 @@
import React, { PureComponent } from 'react'
import styled from 'styled-components'
import { connect } from 'react-redux'
import { Trans } from 'react-i18next'
import { getDeviceModel } from '@ledgerhq/devices'
import type { DeviceModelId } from '@ledgerhq/devices'

Expand All @@ -17,10 +18,10 @@ import TrackPage from 'analytics/TrackPage'

import IconCheckCirle from 'icons/Check'

import type { StepProps } from '..'
import { Title, Inner, FixedTopContainer, StepContainerInner } from '../helperComponents'
import OnboardingFooter from '../OnboardingFooter'

import type { StepProps } from '..'
import Tooltip from '../../base/Tooltip'

const mapDispatchToProps = { deviceModelId }

Expand Down Expand Up @@ -57,6 +58,11 @@ class SelectDevice extends PureComponent<StepProps, {}> {
<img alt="" src={i('ledger-nano-x-onb.svg')} />
</DeviceIcon>
<BlockTitle>{getDeviceModel('nanoX').productName}</BlockTitle>
<Tooltip render={() => <Trans i18nKey="onboarding.selectDevice.usbOnlyTooltip" />}>
<USBOnly>
<Trans i18nKey="onboarding.selectDevice.usbOnly" />
</USBOnly>
</Tooltip>
</DeviceContainer>
<DeviceContainer
isActive={onboarding.deviceModelId === 'nanoS'}
Expand Down Expand Up @@ -150,3 +156,19 @@ const SelectDeviceIconWrapper = styled(Box).attrs({
width: 18px;
height: 18px;
`

const USBOnly = styled(Box).attrs({
alignItems: 'center',
justifyContent: 'center',
ff: 'Open Sans|Bold',
fontSize: 0,
borderRadius: '2px',
})`
position: absolute;
bottom: 20px;
background-color: ${p => p.theme.colors.lightFog};
line-height: 16px;
padding: 0 4px;
text-transform: uppercase;
transform: translateX(-50%);
`
4 changes: 3 additions & 1 deletion static/i18n/en/app.json
Expand Up @@ -639,7 +639,9 @@
}
},
"selectDevice": {
"title": "Select your device"
"title": "Select your device",
"usbOnly": "usb only",
"usbOnlyTooltip": "Ledger Live desktop currently does not support Bluetooth"
},
"selectPIN": {
"disclaimer": {
Expand Down

0 comments on commit c48552d

Please sign in to comment.