|
|
@ -19,7 +19,7 @@ import IconLedgerNanoError from 'icons/illustrations/LedgerNanoError' |
|
|
|
import IconLedgerBlueError from 'icons/illustrations/LedgerBlueError' |
|
|
|
import IconCheck from 'icons/Check' |
|
|
|
|
|
|
|
import { Title, Description, IconOptionRow } from '../helperComponents' |
|
|
|
import { Title, Description, IconOptionRow, FixedTopContainer } from '../helperComponents' |
|
|
|
|
|
|
|
import type { StepProps } from '..' |
|
|
|
import OnboardingFooter from '../OnboardingFooter' |
|
|
@ -120,8 +120,8 @@ class GenuineCheck extends PureComponent<StepProps, State> { |
|
|
|
} |
|
|
|
|
|
|
|
return ( |
|
|
|
<Box sticky pt={50}> |
|
|
|
<Box grow alignItems="center" justifyContent="center"> |
|
|
|
<FixedTopContainer> |
|
|
|
<Box grow alignItems="center"> |
|
|
|
<Title>{t('onboarding:genuineCheck.title')}</Title> |
|
|
|
<Description>{t('onboarding:genuineCheck.desc')}</Description> |
|
|
|
<Box mt={5}> |
|
|
@ -150,11 +150,13 @@ class GenuineCheck extends PureComponent<StepProps, State> { |
|
|
|
</Box> |
|
|
|
</Box> |
|
|
|
<Box justify="center"> |
|
|
|
<RadioGroup |
|
|
|
items={this.getButtonLabel()} |
|
|
|
activeKey={cachedRecoveryStepButton} |
|
|
|
onChange={item => this.handleButtonPass(item, 'recoveryStepPass')} |
|
|
|
/> |
|
|
|
{genuine.pinStepPass && ( |
|
|
|
<RadioGroup |
|
|
|
items={this.getButtonLabel()} |
|
|
|
activeKey={cachedRecoveryStepButton} |
|
|
|
onChange={item => this.handleButtonPass(item, 'recoveryStepPass')} |
|
|
|
/> |
|
|
|
)} |
|
|
|
</Box> |
|
|
|
</CardWrapper> |
|
|
|
</Box> |
|
|
@ -166,24 +168,26 @@ class GenuineCheck extends PureComponent<StepProps, State> { |
|
|
|
<CardTitle>{t('onboarding:genuineCheck.steps.step3.title')}</CardTitle> |
|
|
|
</Box> |
|
|
|
</Box> |
|
|
|
<Box justify="center"> |
|
|
|
{genuine.isDeviceGenuine ? ( |
|
|
|
<Box horizontal align="center" flow={1} color={colors.wallet}> |
|
|
|
<IconCheck size={16} /> |
|
|
|
<GenuineSuccessText> |
|
|
|
{t('onboarding:genuineCheck.isGenuinePassed')} |
|
|
|
</GenuineSuccessText> |
|
|
|
</Box> |
|
|
|
) : ( |
|
|
|
<Button |
|
|
|
primary |
|
|
|
disabled={!genuine.recoveryStepPass} |
|
|
|
onClick={this.handleOpenGenuineCheckModal} |
|
|
|
> |
|
|
|
{t('onboarding:genuineCheck.buttons.genuineCheck')} |
|
|
|
</Button> |
|
|
|
)} |
|
|
|
</Box> |
|
|
|
{genuine.recoveryStepPass && ( |
|
|
|
<Box justify="center"> |
|
|
|
{genuine.isDeviceGenuine ? ( |
|
|
|
<Box horizontal align="center" flow={1} color={colors.wallet}> |
|
|
|
<IconCheck size={16} /> |
|
|
|
<GenuineSuccessText> |
|
|
|
{t('onboarding:genuineCheck.isGenuinePassed')} |
|
|
|
</GenuineSuccessText> |
|
|
|
</Box> |
|
|
|
) : ( |
|
|
|
<Button |
|
|
|
primary |
|
|
|
disabled={!genuine.recoveryStepPass} |
|
|
|
onClick={this.handleOpenGenuineCheckModal} |
|
|
|
> |
|
|
|
{t('onboarding:genuineCheck.buttons.genuineCheck')} |
|
|
|
</Button> |
|
|
|
)} |
|
|
|
</Box> |
|
|
|
)} |
|
|
|
</CardWrapper> |
|
|
|
</Box> |
|
|
|
</Box> |
|
|
@ -201,7 +205,7 @@ class GenuineCheck extends PureComponent<StepProps, State> { |
|
|
|
onClose={this.handleCloseGenuineCheckModal} |
|
|
|
onGenuineCheck={this.handleGenuineCheck} |
|
|
|
/> |
|
|
|
</Box> |
|
|
|
</FixedTopContainer> |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
@ -249,7 +253,7 @@ export function GenuineCheckFail({ |
|
|
|
<Wrapper horizontal> |
|
|
|
<Button |
|
|
|
padded |
|
|
|
outline |
|
|
|
outlineGrey |
|
|
|
onClick={() => { |
|
|
|
redoGenuineCheck() |
|
|
|
}} |
|
|
@ -289,15 +293,21 @@ const Wrapper = styled(Box).attrs({ |
|
|
|
border-bottom-left-radius: ${radii[1]}px; |
|
|
|
border-bottom-right-radius: ${radii[1]}px; |
|
|
|
` |
|
|
|
const CardWrapper = styled(Card).attrs({ |
|
|
|
const CardWrapper = styled(Box).attrs({ |
|
|
|
horizontal: true, |
|
|
|
p: 5, |
|
|
|
borderRadius: '4px', |
|
|
|
justify: 'space-between', |
|
|
|
})` |
|
|
|
width: 580px; |
|
|
|
height: 74px; |
|
|
|
transition: all ease-in-out 0.2s; |
|
|
|
border: ${p => `1px ${p.isDisabled ? 'dashed' : 'solid'} ${p.theme.colors.fog}`}; |
|
|
|
pointer-events: ${p => (p.isDisabled ? 'none' : 'auto')}; |
|
|
|
background-color: ${p => (p.isDisabled ? p.theme.colors.lightGrey : p.theme.colors.white)}; |
|
|
|
opacity: ${p => (p.isDisabled ? 0.7 : 1)}; |
|
|
|
&:hover { |
|
|
|
cursor: pointer; |
|
|
|
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.05); |
|
|
|
} |
|
|
|
` |
|
|
|