Browse Source

Merge pull request #839 from meriadec/polishes

Visual polishes
master
Gaëtan Renaudeau 7 years ago
committed by GitHub
parent
commit
c87699fb12
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      src/components/DeviceInteraction/components.js
  2. 2
      src/components/EnsureDeviceApp.js
  3. 3
      src/components/ManagerPage/ManagerGenuineCheck.js
  4. 1
      src/components/base/AccountsList/index.js
  5. 1
      src/components/modals/AddAccounts/index.js
  6. 26
      src/components/modals/OperationDetails.js
  7. 2
      src/components/modals/Receive/steps/03-step-confirm-address.js
  8. 2
      src/components/modals/StepConnectDevice.js

1
src/components/DeviceInteraction/components.js

@ -19,6 +19,7 @@ export const DeviceInteractionStepContainer = styled(Box).attrs({
ff: 'Open Sans', ff: 'Open Sans',
fontSize: 3, fontSize: 3,
color: 'graphite', color: 'graphite',
bg: p => (p.isActive && !p.isFinished ? 'white' : ''),
})` })`
position: relative; position: relative;
z-index: ${p => (p.isActive ? 1 : '')}; z-index: ${p => (p.isActive ? 1 : '')};

2
src/components/EnsureDeviceApp.js

@ -79,7 +79,7 @@ class EnsureDeviceApp extends Component<{
return ( return (
<Trans i18nKey="deviceConnect:step2.open" parent="div"> <Trans i18nKey="deviceConnect:step2.open" parent="div">
{'Open the '} {'Open the '}
<strong>{cur.name}</strong> <Bold>{cur.name}</Bold>
{' app on your device'} {' app on your device'}
</Trans> </Trans>
) )

3
src/components/ManagerPage/ManagerGenuineCheck.js

@ -22,9 +22,8 @@ class ManagerGenuineCheck extends PureComponent<Props> {
render() { render() {
const { t, onSuccess } = this.props const { t, onSuccess } = this.props
return ( return (
<Box align="center"> <Box align="center" py={7}>
<TrackPage category="Manager" name="Genuine Check" /> <TrackPage category="Manager" name="Genuine Check" />
<Space of={60} />
<Box align="center" style={{ maxWidth: 460 }}> <Box align="center" style={{ maxWidth: 460 }}>
<img <img
src={i('logos/connectDevice.png')} src={i('logos/connectDevice.png')}

1
src/components/base/AccountsList/index.js

@ -86,6 +86,7 @@ class AccountsList extends Component<
{withToggleAll && ( {withToggleAll && (
<FakeLink <FakeLink
ml="auto" ml="auto"
ff="Museo Sans|Regular"
onClick={isAllSelected ? this.onUnselectAll : this.onSelectAll} onClick={isAllSelected ? this.onUnselectAll : this.onSelectAll}
fontSize={3} fontSize={3}
style={{ lineHeight: '10px' }} style={{ lineHeight: '10px' }}

1
src/components/modals/AddAccounts/index.js

@ -190,6 +190,7 @@ class AddAccounts extends PureComponent<Props, State> {
handleResetScanState = () => { handleResetScanState = () => {
this.setState({ this.setState({
isAppOpened: false,
scanStatus: 'idle', scanStatus: 'idle',
err: null, err: null,
scannedAccounts: [], scannedAccounts: [],

26
src/components/modals/OperationDetails.js

@ -8,6 +8,7 @@ import styled from 'styled-components'
import moment from 'moment' import moment from 'moment'
import { getOperationAmountNumber } from '@ledgerhq/live-common/lib/helpers/operation' import { getOperationAmountNumber } from '@ledgerhq/live-common/lib/helpers/operation'
import { getAccountOperationExplorer } from '@ledgerhq/live-common/lib/explorers' import { getAccountOperationExplorer } from '@ledgerhq/live-common/lib/explorers'
import uniq from 'lodash/uniq'
import TrackPage from 'analytics/TrackPage' import TrackPage from 'analytics/TrackPage'
import type { Account, Operation } from '@ledgerhq/live-common/lib/types' import type { Account, Operation } from '@ledgerhq/live-common/lib/types'
@ -126,6 +127,7 @@ const OperationDetails = connect(mapStateToProps)((props: Props) => {
const isConfirmed = confirmations >= currencySettings.confirmationsNb const isConfirmed = confirmations >= currencySettings.confirmationsNb
const url = getAccountOperationExplorer(account, operation) const url = getAccountOperationExplorer(account, operation)
const uniqueSenders = uniq(senders)
return ( return (
<ModalBody onClose={onClose}> <ModalBody onClose={onClose}>
@ -217,12 +219,12 @@ const OperationDetails = connect(mapStateToProps)((props: Props) => {
<B /> <B />
<Box> <Box>
<OpDetailsTitle>{t('app:operationDetails.from')}</OpDetailsTitle> <OpDetailsTitle>{t('app:operationDetails.from')}</OpDetailsTitle>
<Recipients recipients={senders} t={t} /> <DataList lines={uniqueSenders} t={t} />
</Box> </Box>
<B /> <B />
<Box> <Box>
<OpDetailsTitle>{t('app:operationDetails.to')}</OpDetailsTitle> <OpDetailsTitle>{t('app:operationDetails.to')}</OpDetailsTitle>
<Recipients recipients={recipients} t={t} /> <DataList lines={recipients} t={t} />
</Box> </Box>
</Box> </Box>
</GrowScroll> </GrowScroll>
@ -271,7 +273,7 @@ const More = styled(Text).attrs({
outline: none; outline: none;
` `
export class Recipients extends Component<{ recipients: Array<*>, t: T }, *> { export class DataList extends Component<{ lines: string[], t: T }, *> {
state = { state = {
showMore: false, showMore: false,
} }
@ -279,18 +281,18 @@ export class Recipients extends Component<{ recipients: Array<*>, t: T }, *> {
this.setState(({ showMore }) => ({ showMore: !showMore })) this.setState(({ showMore }) => ({ showMore: !showMore }))
} }
render() { render() {
const { recipients, t } = this.props const { lines, t } = this.props
const { showMore } = this.state const { showMore } = this.state
// Hardcoded for now // Hardcoded for now
const numToShow = 2 const numToShow = 2
const shouldShowMore = recipients.length > 3 const shouldShowMore = lines.length > 3
return ( return (
<Box> <Box>
{(shouldShowMore ? recipients.slice(0, numToShow) : recipients).map(recipient => ( {(shouldShowMore ? lines.slice(0, numToShow) : lines).map(line => (
<OpDetailsData key={recipient}> <OpDetailsData key={line}>
{recipient} {line}
<GradientHover> <GradientHover>
<CopyWithFeedback text={recipient} /> <CopyWithFeedback text={line} />
</GradientHover> </GradientHover>
</OpDetailsData> </OpDetailsData>
))} ))}
@ -299,14 +301,12 @@ export class Recipients extends Component<{ recipients: Array<*>, t: T }, *> {
<Box onClick={this.onClick} py={1}> <Box onClick={this.onClick} py={1}>
<More fontSize={4} color="wallet" ff="Open Sans|SemiBold" mt={1}> <More fontSize={4} color="wallet" ff="Open Sans|SemiBold" mt={1}>
<IconChevronRight size={12} style={{ marginRight: 5 }} /> <IconChevronRight size={12} style={{ marginRight: 5 }} />
{t('app:operationDetails.showMore', { recipients: recipients.length - numToShow })} {t('app:operationDetails.showMore', { recipients: lines.length - numToShow })}
</More> </More>
</Box> </Box>
)} )}
{showMore && {showMore &&
recipients lines.slice(numToShow).map(line => <OpDetailsData key={line}>{line}</OpDetailsData>)}
.slice(numToShow)
.map(recipient => <OpDetailsData key={recipient}>{recipient}</OpDetailsData>)}
{shouldShowMore && {shouldShowMore &&
showMore && ( showMore && (
<Box onClick={this.onClick} py={1}> <Box onClick={this.onClick} py={1}>

2
src/components/modals/Receive/steps/03-step-confirm-address.js

@ -74,7 +74,7 @@ const Container = styled(Box).attrs({
})`` })``
const Title = styled(Box).attrs({ const Title = styled(Box).attrs({
ff: 'Museo Sans|Regular', ff: 'Open Sans|SemiBold',
fontSize: 6, fontSize: 6,
mb: 1, mb: 1,
})`` })``

2
src/components/modals/StepConnectDevice.js

@ -20,7 +20,7 @@ const StepConnectDevice = ({ account, currency, onChangeDevice, onStatusChange }
<EnsureDeviceApp <EnsureDeviceApp
account={account} account={account}
currency={currency} currency={currency}
waitBeforeSuccess={500} waitBeforeSuccess={200}
onSuccess={({ device }) => { onSuccess={({ device }) => {
// TODO: remove those non-nense callbacks // TODO: remove those non-nense callbacks
if (onChangeDevice) { if (onChangeDevice) {

Loading…
Cancel
Save