Anastasia Poupeney
7 years ago
13 changed files with 169 additions and 75 deletions
@ -0,0 +1,71 @@ |
|||
// @flow
|
|||
|
|||
import React, { PureComponent } from 'react' |
|||
import { shell } from 'electron' |
|||
|
|||
import Box from 'components/base/Box' |
|||
import IconUser from 'icons/User' |
|||
import IconCart from 'icons/Cart' |
|||
import IconTruck from 'icons/Truck' |
|||
import IconInfoCircle from 'icons/InfoCircle' |
|||
import Button from '../../base/Button/index' |
|||
import { Title, OnboardingFooterWrapper } from '../helperComponents' |
|||
import { OptionFlowCard } from './Init' |
|||
|
|||
import type { StepProps } from '..' |
|||
|
|||
class NoDevice extends PureComponent<StepProps, *> { |
|||
render() { |
|||
const { t, prevStep } = this.props |
|||
|
|||
const optionCards = [ |
|||
{ |
|||
key: 'buyNew', |
|||
icon: <IconCart size={20} />, |
|||
title: t('onboarding:noDevice.buyNew.title'), |
|||
onClick: () => { |
|||
shell.openExternal('https://www.ledgerwallet.com/') |
|||
}, |
|||
}, |
|||
{ |
|||
key: 'trackOrder', |
|||
icon: <IconTruck size={20} />, |
|||
title: t('onboarding:noDevice.trackOrder.title'), |
|||
onClick: () => { |
|||
shell.openExternal('http://order.ledgerwallet.com/') |
|||
}, |
|||
}, |
|||
{ |
|||
key: 'learnMore', |
|||
icon: <IconInfoCircle size={20} />, |
|||
title: t('onboarding:noDevice.learnMore.title'), |
|||
onClick: () => { |
|||
shell.openExternal('https://www.ledgerwallet.com/') |
|||
}, |
|||
}, |
|||
] |
|||
|
|||
return ( |
|||
<Box sticky pt={130}> |
|||
<Box grow alignItems="center"> |
|||
<Box color="wallet"> |
|||
<IconUser size={36} /> |
|||
</Box> |
|||
<Box m={5} style={{ maxWidth: 480 }}> |
|||
<Title>{t('onboarding:noDevice.title')}</Title> |
|||
</Box> |
|||
<Box pt={4} flow={4}> |
|||
{optionCards.map(card => <OptionFlowCard key={card.key} card={card} />)} |
|||
</Box> |
|||
</Box> |
|||
<OnboardingFooterWrapper> |
|||
<Button padded outlineGrey onClick={() => prevStep()} mr="auto"> |
|||
{t('app:common.back')} |
|||
</Button> |
|||
</OnboardingFooterWrapper> |
|||
</Box> |
|||
) |
|||
} |
|||
} |
|||
|
|||
export default NoDevice |
@ -0,0 +1,16 @@ |
|||
// @flow
|
|||
|
|||
import React from 'react' |
|||
|
|||
const path = ( |
|||
<path |
|||
fill="currentColor" |
|||
d="M15.333 2.375H4.008l-.243-1.307A.677.677 0 0 0 3.111.5H.333A.343.343 0 0 0 0 .852v.703c0 .194.15.351.333.351h2.23l1.932 10.421A1.923 1.923 0 0 0 4 13.625c0 1.036.796 1.875 1.778 1.875s1.778-.84 1.778-1.875c0-.33-.082-.653-.239-.938h4.033a1.945 1.945 0 0 0-.239.938c0 1.036.796 1.875 1.778 1.875s1.778-.84 1.778-1.875c0-.531-.21-1.01-.547-1.352l.029-.14c.09-.437-.226-.852-.652-.852H5.66L5.4 9.875h8.677c.314 0 .585-.23.652-.554l1.256-6.094c.09-.438-.227-.852-.652-.852zM5.778 14.328c-.368 0-.667-.315-.667-.703 0-.388.3-.703.667-.703.367 0 .666.315.666.703 0 .388-.299.703-.666.703zm7.11 0c-.367 0-.666-.315-.666-.703 0-.388.3-.703.667-.703.368 0 .667.315.667.703 0 .388-.3.703-.667.703zm.652-5.86H5.138l-.87-4.687h10.238L13.54 8.47z" |
|||
/> |
|||
) |
|||
|
|||
export default ({ size, ...p }: { size: number }) => ( |
|||
<svg viewBox="0 0 16 16" height={size} width={size} {...p}> |
|||
{path} |
|||
</svg> |
|||
) |
@ -0,0 +1,16 @@ |
|||
// @flow
|
|||
|
|||
import React from 'react' |
|||
|
|||
const path = ( |
|||
<path |
|||
fill="currentColor" |
|||
d="M14.8 1.5h-8c-.663 0-1.2.546-1.2 1.219v1.219H4.497a1.19 1.19 0 0 0-.848.356L1.15 6.831a1.228 1.228 0 0 0-.351.861v3.152H.5c-.166 0-.3.136-.3.304v.61c0 .168.134.305.3.305h1.1C1.6 13.409 2.675 14.5 4 14.5s2.4-1.091 2.4-2.438h3.2c0 1.347 1.075 2.438 2.4 2.438s2.4-1.091 2.4-2.438h.4c.663 0 1.2-.545 1.2-1.218V2.719A1.21 1.21 0 0 0 14.8 1.5zM4 13.281a1.21 1.21 0 0 1-1.2-1.219A1.21 1.21 0 0 1 4 10.845c.662 0 1.2.546 1.2 1.219A1.21 1.21 0 0 1 4 13.28zm1.6-3.035A2.37 2.37 0 0 0 4 9.625c-.835 0-1.57.433-2 1.09V7.692l2.497-2.536H5.6v5.09zM12 13.28a1.21 1.21 0 0 1-1.2-1.219 1.21 1.21 0 0 1 1.2-1.218c.662 0 1.2.546 1.2 1.219A1.21 1.21 0 0 1 12 13.28zm2.8-2.437h-.721A2.393 2.393 0 0 0 12 9.625c-.888 0-1.664.49-2.079 1.219H6.8V2.719h8v8.125zM2.8 8l2-2.031V8h-2z" |
|||
/> |
|||
) |
|||
|
|||
export default ({ size, ...p }: { size: number }) => ( |
|||
<svg viewBox="0 0 16 16" height={size} width={size} {...p}> |
|||
{path} |
|||
</svg> |
|||
) |
Loading…
Reference in new issue