Anastasia Poupeney 7 years ago
parent
commit
b3a6ae4582
  1. 57
      src/components/IsUnlocked.js
  2. 14
      src/components/Onboarding/helperComponents.js
  3. 12
      src/components/Onboarding/steps/Finish.js
  4. 12
      src/components/Onboarding/steps/Init.js
  5. 18
      src/components/Onboarding/steps/NoDevice.js
  6. 6
      src/components/Onboarding/steps/Start.js
  7. 1
      src/components/SettingsPage/PasswordForm.js
  8. 2
      src/components/SettingsPage/PasswordModal.js
  9. 29
      src/components/base/LedgerLiveLogo.js
  10. 17
      src/icons/ArrowRight.js

57
src/components/IsUnlocked.js

@ -24,6 +24,8 @@ import { createCustomErrorClass } from 'helpers/errors'
import Box from 'components/base/Box' import Box from 'components/base/Box'
import InputPassword from 'components/base/InputPassword' import InputPassword from 'components/base/InputPassword'
import LedgerLiveLogo from 'components/base/LedgerLiveLogo'
import IconArrowRight from 'icons/ArrowRight'
import Button from './base/Button/index' import Button from './base/Button/index'
import ConfirmModal from './base/Modal/ConfirmModal' import ConfirmModal from './base/Modal/ConfirmModal'
@ -68,16 +70,12 @@ const defaultState = {
} }
export const PageTitle = styled(Box).attrs({ export const PageTitle = styled(Box).attrs({
width: 152,
height: 27,
ff: 'Museo Sans|Regular', ff: 'Museo Sans|Regular',
fontSize: 7, fontSize: 7,
color: 'dark', color: 'dark',
})`` })``
export const LockScreenDesc = styled(Box).attrs({ export const LockScreenDesc = styled(Box).attrs({
width: 340,
height: 36,
ff: 'Open Sans|Regular', ff: 'Open Sans|Regular',
fontSize: 4, fontSize: 4,
textAlign: 'center', textAlign: 'center',
@ -156,33 +154,42 @@ class IsUnlocked extends Component<Props, State> {
<Box sticky alignItems="center" justifyContent="center"> <Box sticky alignItems="center" justifyContent="center">
<form onSubmit={this.handleSubmit}> <form onSubmit={this.handleSubmit}>
<Box align="center"> <Box align="center">
<div <LedgerLiveLogo
style={{ style={{ marginBottom: 40 }}
padding: 14, icon={
backgroundColor: 'white', <img
borderRadius: 80, src={i('ledgerlive-logo.svg')}
fontSize: 0, alt=""
marginBottom: 40, draggable="false"
boxShadow: '0 2px 23px 0 rgba(0, 0, 0, 0.08)', width={50}
}} height={50}
> />
<img alt="" src={i('ledgerlive-logo.svg')} width={50} height={50} /> }
</div> />
<PageTitle>{t('app:common.lockScreen.title')}</PageTitle> <PageTitle>{t('app:common.lockScreen.title')}</PageTitle>
<LockScreenDesc> <LockScreenDesc>
{t('app:common.lockScreen.subTitle')} {t('app:common.lockScreen.subTitle')}
<br /> <br />
{t('app:common.lockScreen.description')} {t('app:common.lockScreen.description')}
</LockScreenDesc> </LockScreenDesc>
<Box style={{ minWidth: 230 }}> <Box horizontal align="center">
<InputPassword <Box style={{ width: 280 }}>
autoFocus <InputPassword
placeholder={t('app:common.lockScreen.inputPlaceholder')} autoFocus
type="password" placeholder={t('app:common.lockScreen.inputPlaceholder')}
onChange={this.handleChangeInput('password')} type="password"
value={inputValue.password} onChange={this.handleChangeInput('password')}
error={incorrectPassword} value={inputValue.password}
/> error={incorrectPassword}
/>
</Box>
<Box ml={2}>
<Button style={{ width: 38, height: 38 }} primary onClick={this.handleSubmit}>
<Box style={{ alignItems: 'center' }}>
<IconArrowRight size={16} />
</Box>
</Button>
</Box>
</Box> </Box>
<Button type="button" mt={3} small onClick={this.handleOpenHardResetModal}> <Button type="button" mt={3} small onClick={this.handleOpenHardResetModal}>
{t('app:common.lockScreen.lostPassword')} {t('app:common.lockScreen.lostPassword')}

14
src/components/Onboarding/helperComponents.js

@ -52,20 +52,6 @@ export const OnboardingFooterWrapper = styled(Box).attrs({
border-bottom-left-radius: ${radii[1]}px; border-bottom-left-radius: ${radii[1]}px;
border-bottom-right-radius: ${radii[1]}px; border-bottom-right-radius: ${radii[1]}px;
` `
// LIVE LOGO
export function LiveLogo({ icon, ...p }: { icon: any }) {
return <LiveLogoContainer {...p}>{icon}</LiveLogoContainer>
}
export const LiveLogoContainer = styled(Box).attrs({
borderRadius: '50%',
alignItems: 'center',
justifyContent: 'center',
})`
background-color: white;
box-shadow: 0 2px 24px 0 #00000014;
width: ${p => (p.width ? p.width : 80)}
height: ${p => (p.height ? p.height : 80)}
`
// INSTRUCTION LIST // INSTRUCTION LIST
type StepType = { type StepType = {

12
src/components/Onboarding/steps/Finish.js

@ -9,6 +9,7 @@ import { urls } from 'config/urls'
import Box from 'components/base/Box' import Box from 'components/base/Box'
import Button from 'components/base/Button' import Button from 'components/base/Button'
import ConfettiParty from 'components/ConfettiParty' import ConfettiParty from 'components/ConfettiParty'
import LedgerLiveLogo from 'components/base/LedgerLiveLogo'
import TrackPage from 'analytics/TrackPage' import TrackPage from 'analytics/TrackPage'
import IconCheckFull from 'icons/CheckFull' import IconCheckFull from 'icons/CheckFull'
@ -19,7 +20,7 @@ import IconSocialGithub from 'icons/Github'
import { lighten } from 'styles/helpers' import { lighten } from 'styles/helpers'
import type { StepProps } from '..' import type { StepProps } from '..'
import { Title, Description, LiveLogo } from '../helperComponents' import { Title, Description } from '../helperComponents'
const ConfettiLayer = styled.div` const ConfettiLayer = styled.div`
position: absolute; position: absolute;
@ -83,13 +84,14 @@ export default class Finish extends Component<StepProps, *> {
onMouseUp={this.onMouseUp} onMouseUp={this.onMouseUp}
onMouseLeave={this.onMouseLeave} onMouseLeave={this.onMouseLeave}
> >
<LiveLogo <LedgerLiveLogo
style={{ width: 64, height: 64 }} width="64px"
height="64px"
icon={ icon={
<img <img
draggable="false"
alt=""
src={i('ledgerlive-logo.svg')} src={i('ledgerlive-logo.svg')}
alt=""
draggable="false"
width={40} width={40}
height={40} height={40}
/> />

12
src/components/Onboarding/steps/Init.js

@ -8,6 +8,7 @@ import styled from 'styled-components'
import { flowType } from 'reducers/onboarding' import { flowType } from 'reducers/onboarding'
import Box from 'components/base/Box' import Box from 'components/base/Box'
import GrowScroll from 'components/base/GrowScroll' import GrowScroll from 'components/base/GrowScroll'
import LedgerLiveLogo from 'components/base/LedgerLiveLogo'
import TrackPage from 'analytics/TrackPage' import TrackPage from 'analytics/TrackPage'
import IconPlus from 'icons/Plus' import IconPlus from 'icons/Plus'
import IconRecover from 'icons/Recover' import IconRecover from 'icons/Recover'
@ -15,7 +16,7 @@ import IconCheck from 'icons/Check'
import IconExternalLink from 'icons/ExternalLink' import IconExternalLink from 'icons/ExternalLink'
import IconChevronRight from 'icons/ChevronRight' import IconChevronRight from 'icons/ChevronRight'
import { i } from 'helpers/staticPath' import { i } from 'helpers/staticPath'
import { Title, LiveLogo } from '../helperComponents' import { Title } from '../helperComponents'
import type { StepProps } from '..' import type { StepProps } from '..'
@ -68,9 +69,12 @@ class Init extends PureComponent<StepProps, *> {
<GrowScroll full justifyContent="center" py={7}> <GrowScroll full justifyContent="center" py={7}>
<TrackPage category="Onboarding" name="Init" /> <TrackPage category="Onboarding" name="Init" />
<Box align="center"> <Box align="center">
<LiveLogo <LedgerLiveLogo
style={{ width: 64, height: 64 }} width="64px"
icon={<img src={i('ledgerlive-logo.svg')} alt="" width={40} height={40} />} height="64px"
icon={
<img src={i('ledgerlive-logo.svg')} alt="" draggable="false" width={40} height={40} />
}
/> />
<Box m={5} style={{ maxWidth: 480 }}> <Box m={5} style={{ maxWidth: 480 }}>
<Title>{t('onboarding:init.title')}</Title> <Title>{t('onboarding:init.title')}</Title>

18
src/components/Onboarding/steps/NoDevice.js

@ -6,13 +6,14 @@ import { i } from 'helpers/staticPath'
import Box from 'components/base/Box' import Box from 'components/base/Box'
import GrowScroll from 'components/base/GrowScroll' import GrowScroll from 'components/base/GrowScroll'
import LedgerLiveLogo from 'components/base/LedgerLiveLogo'
import TrackPage from 'analytics/TrackPage' import TrackPage from 'analytics/TrackPage'
import { urls } from 'config/urls' import { urls } from 'config/urls'
import IconCart from 'icons/Cart' import IconCart from 'icons/Cart'
import IconTruck from 'icons/Truck' import IconTruck from 'icons/Truck'
import IconInfoCircle from 'icons/InfoCircle' import IconInfoCircle from 'icons/InfoCircle'
import Button from '../../base/Button/index' import Button from '../../base/Button/index'
import { Title, OnboardingFooterWrapper, LiveLogo } from '../helperComponents' import { Title, OnboardingFooterWrapper } from '../helperComponents'
import { OptionFlowCard } from './Init' import { OptionFlowCard } from './Init'
import type { StepProps } from '..' import type { StepProps } from '..'
@ -53,9 +54,18 @@ class NoDevice extends PureComponent<StepProps, *> {
<GrowScroll pb={7} pt={130}> <GrowScroll pb={7} pt={130}>
<TrackPage category="Onboarding" name="No Device" /> <TrackPage category="Onboarding" name="No Device" />
<Box grow alignItems="center"> <Box grow alignItems="center">
<LiveLogo <LedgerLiveLogo
style={{ width: 64, height: 64 }} width="64px"
icon={<img src={i('ledgerlive-logo.svg')} alt="" width={40} height={40} />} height="64px"
icon={
<img
src={i('ledgerlive-logo.svg')}
alt=""
draggable="false"
width={40}
height={40}
/>
}
/> />
<Box m={5} style={{ maxWidth: 480 }}> <Box m={5} style={{ maxWidth: 480 }}>
<Title>{t('onboarding:noDevice.title')}</Title> <Title>{t('onboarding:noDevice.title')}</Title>

6
src/components/Onboarding/steps/Start.js

@ -6,9 +6,10 @@ import { i } from 'helpers/staticPath'
import Box from 'components/base/Box' import Box from 'components/base/Box'
import Button from 'components/base/Button' import Button from 'components/base/Button'
import TrackPage from 'analytics/TrackPage' import TrackPage from 'analytics/TrackPage'
import LedgerLiveLogo from 'components/base/LedgerLiveLogo'
import type { StepProps } from '..' import type { StepProps } from '..'
import { Title, LiveLogo } from '../helperComponents' import { Title } from '../helperComponents'
export default (props: StepProps) => { export default (props: StepProps) => {
const { jumpStep, t } = props const { jumpStep, t } = props
@ -16,8 +17,7 @@ export default (props: StepProps) => {
<Box sticky justifyContent="center"> <Box sticky justifyContent="center">
<TrackPage category="Onboarding" name="Start" /> <TrackPage category="Onboarding" name="Start" />
<Box alignItems="center"> <Box alignItems="center">
<LiveLogo <LedgerLiveLogo
style={{ width: 80, height: 80 }}
icon={<img src={i('ledgerlive-logo.svg')} alt="" width={50} height={50} />} icon={<img src={i('ledgerlive-logo.svg')} alt="" width={50} height={50} />}
/> />
<Box my={5}> <Box my={5}>

1
src/components/SettingsPage/PasswordForm.js

@ -77,6 +77,7 @@ class PasswordForm extends PureComponent<Props> {
error={!isValid() && confirmPassword.length > 0 && new PasswordsDontMatchError()} error={!isValid() && confirmPassword.length > 0 && new PasswordsDontMatchError()}
/> />
</Box> </Box>
<button hidden type="submit" />
</Box> </Box>
</form> </form>
) )

2
src/components/SettingsPage/PasswordModal.js

@ -112,7 +112,7 @@ class PasswordModal extends PureComponent<Props, State> {
/> />
</ModalContent> </ModalContent>
<ModalFooter horizontal align="center" justify="flex-end" flow={2}> <ModalFooter horizontal align="center" justify="flex-end" flow={2}>
<Button small type="Button small" onClick={onClose}> <Button small type="button" onClick={onClose}>
{t('app:common.cancel')} {t('app:common.cancel')}
</Button> </Button>
<Button <Button

29
src/components/base/LedgerLiveLogo.js

@ -0,0 +1,29 @@
// @flow
import React, { PureComponent } from 'react'
import styled from 'styled-components'
import Box from 'components/base/Box'
type Props = {
icon: any,
}
class LedgerLiveLogo extends PureComponent<Props> {
render() {
const { icon, ...p } = this.props
return <LiveLogoContainer {...p}>{icon}</LiveLogoContainer>
}
}
const LiveLogoContainer = styled(Box).attrs({
borderRadius: '50%',
alignItems: 'center',
justifyContent: 'center',
})`
background-color: white;
box-shadow: 0 2px 24px 0 #00000014;
width: ${p => (p.width ? p.width : '80px')};
height: ${p => (p.height ? p.height : '80px')};
`
export default LedgerLiveLogo

17
src/icons/ArrowRight.js

@ -0,0 +1,17 @@
// @flow
import React from 'react'
const path = (
<path
fill="currentColor"
transform="rotate(90 7.75 8.25)"
d="M7 4.56L4.28 7.28a.75.75 0 0 1-1.06-1.06l3.896-3.897A.765.765 0 0 1 7.75 2c.267 0 .5.13.633.323L12.28 6.22a.75.75 0 0 1-1.06 1.06L8.5 4.56v9.246c0 .383-.336.694-.75.694S7 14.19 7 13.806V4.56z"
/>
)
export default ({ size, ...p }: { size: number }) => (
<svg viewBox="0 0 16 16" height={size} width={size} {...p}>
{path}
</svg>
)
Loading…
Cancel
Save