From 158e45b8f913877bd504350cf741626eef6e0182 Mon Sep 17 00:00:00 2001 From: meriadec Date: Thu, 1 Mar 2018 17:16:26 +0100 Subject: [PATCH 1/7] Add badges --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 11df398e..1a482970 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # Ledger Wallet Desktop +[![CircleCI](https://circleci.com/gh/LedgerHQ/ledger-wallet-desktop.svg?style=svg)](https://circleci.com/gh/LedgerHQ/ledger-wallet-desktop) +[![Crowdin](https://d322cqt584bo4o.cloudfront.net/ledger-wallet/localized.svg)](https://crowdin.com/project/ledger-wallet) + ## Requirements * nodejs v8.x (https://nodejs.org/en/) From 49fd743640e9bc70d715e242e9dc1a72edc5fe5d Mon Sep 17 00:00:00 2001 From: meriadec Date: Thu, 1 Mar 2018 17:58:59 +0100 Subject: [PATCH 2/7] Work on Account page --- src/components/AccountPage/AccountHeader.js | 46 +++++++++++++++++++ .../{AccountPage.js => AccountPage/index.js} | 29 +++--------- src/components/TransactionsList/index.js | 5 ++ 3 files changed, 57 insertions(+), 23 deletions(-) create mode 100644 src/components/AccountPage/AccountHeader.js rename src/components/{AccountPage.js => AccountPage/index.js} (78%) diff --git a/src/components/AccountPage/AccountHeader.js b/src/components/AccountPage/AccountHeader.js new file mode 100644 index 00000000..9f01e89a --- /dev/null +++ b/src/components/AccountPage/AccountHeader.js @@ -0,0 +1,46 @@ +// @flow + +import React, { PureComponent } from 'react' +import { getIconByCoinType } from '@ledgerhq/currencies/react' +import styled from 'styled-components' + +import type { Account } from 'types/common' + +import Box from 'components/base/Box' +import Text from 'components/base/Text' + +const CurName = styled(Text).attrs({ + ff: 'Open Sans|SemiBold', + fontSize: 2, +})` + text-transform: uppercase; + letter-spacing: 1px; +` + +type Props = { + account: Account, +} + +class AccountHeader extends PureComponent { + render() { + const { account } = this.props + const Icon = getIconByCoinType(account.currency.coinType) + return ( + + {Icon && ( + + + + )} + + {account.currency.name} + + {account.name} + + + + ) + } +} + +export default AccountHeader diff --git a/src/components/AccountPage.js b/src/components/AccountPage/index.js similarity index 78% rename from src/components/AccountPage.js rename to src/components/AccountPage/index.js index 2f94a9e3..b801e307 100644 --- a/src/components/AccountPage.js +++ b/src/components/AccountPage/index.js @@ -20,9 +20,9 @@ import Box, { Card } from 'components/base/Box' import Button from 'components/base/Button' import Icon from 'components/base/Icon' import IconControls from 'icons/Controls' -import ReceiveBox from 'components/ReceiveBox' import Text from 'components/base/Text' import TransactionsList from 'components/TransactionsList' +import AccountHeader from './AccountHeader' type Props = { t: T, @@ -48,11 +48,9 @@ class AccountPage extends PureComponent { } return ( - + - - {account.name} - + - - - - {formatBTC(account.balance)} - - - - - - - - - + + {formatBTC(account.balance)} + diff --git a/src/components/TransactionsList/index.js b/src/components/TransactionsList/index.js index b3e98b59..ff211728 100644 --- a/src/components/TransactionsList/index.js +++ b/src/components/TransactionsList/index.js @@ -58,12 +58,17 @@ const TransactionRaw = styled(Box).attrs({ horizontal: true, alignItems: 'center', })` + cursor: pointer; border-bottom: 1px solid ${p => p.theme.colors.fog}; height: 68px; &:last-child { border-bottom: 0; } + + &:hover { + background: ${p => p.theme.colors.lightGrey}; + } ` const Cell = styled(Box).attrs({ From 36c021ee9c9dc883a44ba9546980f03d072c3ece Mon Sep 17 00:00:00 2001 From: meriadec Date: Fri, 2 Mar 2018 10:09:36 +0100 Subject: [PATCH 3/7] Save account settings in local db --- src/components/AccountPage/index.js | 7 +++++-- src/components/TransactionsList/index.js | 4 ++++ src/components/modals/SettingsAccount.js | 2 +- src/reducers/accounts.js | 2 ++ 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/components/AccountPage/index.js b/src/components/AccountPage/index.js index b801e307..15f60fa3 100644 --- a/src/components/AccountPage/index.js +++ b/src/components/AccountPage/index.js @@ -69,7 +69,7 @@ class AccountPage extends PureComponent {