Browse Source

Merge branch 'develop' of github.com:ledgerhq/ledger-live-desktop into pixel-push-khalil

master
Gaëtan Renaudeau 7 years ago
parent
commit
4f8c1f1538
  1. 4
      .circleci/config.yml
  2. 14
      src/components/AccountPage/EmptyStateAccount.js
  3. 5
      src/components/DashboardPage/EmptyState.js
  4. 2
      src/components/DeviceConnect/index.js
  5. 8
      src/components/TopBar/ActivityIndicator.js
  6. 4
      src/components/base/Spinner.js
  7. 4
      src/icons/Loader.js
  8. 2
      src/renderer/createStore.js
  9. 4
      static/i18n/en/app.yml

4
.circleci/config.yml

@ -15,13 +15,13 @@ jobs:
- restore_cache:
name: Restore Yarn Package Cache
keys:
- v1-yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }}
- v1-yarn-packages-{{ checksum "yarn.lock" }}
- run:
name: Install Dependencies
command: bash scripts/install-ci-deps.sh
- save_cache:
name: Save Yarn Package Cache
key: v1-yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }}
key: v1-yarn-packages-{{ checksum "yarn.lock" }}
paths:
- node_modules/
- run:

14
src/components/AccountPage/EmptyStateAccount.js

@ -4,7 +4,7 @@ import React, { PureComponent } from 'react'
import { i } from 'helpers/staticPath'
import { connect } from 'react-redux'
import { compose } from 'redux'
import { translate } from 'react-i18next'
import { translate, Trans } from 'react-i18next'
import { openModal } from 'reducers/modals'
import type { T } from 'types/common'
@ -13,6 +13,7 @@ import type { Account } from '@ledgerhq/live-common/lib/types'
import { MODAL_RECEIVE } from 'config/constants'
import Box from 'components/base/Box'
import Text from 'components/base/Text'
import Button from 'components/base/Button'
import { Title, Description } from 'components/DashboardPage/EmptyState'
import IconReceive from 'icons/Receive'
@ -30,7 +31,6 @@ type Props = {
class EmptyStateAccount extends PureComponent<Props, *> {
render() {
const { t, account, openModal } = this.props
return (
<Box mt={7} alignItems="center">
<img
@ -41,7 +41,15 @@ class EmptyStateAccount extends PureComponent<Props, *> {
/>
<Box mt={5} alignItems="center">
<Title>{t('app:account.emptyState.title')}</Title>
<Description>{t('app:account.emptyState.desc')}</Description>
<Description>
<Trans i18nKey="app:account.emptyState.desc">
Make sure the
<Text ff="Open Sans|SemiBold" color="dark">
{account.currency.name}
</Text>
app is installed to receive funds.
</Trans>
</Description>
<Button mt={3} padded primary onClick={() => openModal(MODAL_RECEIVE, { account })}>
<Box horizontal flow={1} alignItems="center">
<IconReceive size={12} />

5
src/components/DashboardPage/EmptyState.js

@ -48,13 +48,13 @@ class EmptyState extends PureComponent<Props, *> {
<Title>{t('app:emptyState.dashboard.title')}</Title>
<Description>{t('app:emptyState.dashboard.desc')}</Description>
<Box mt={3} horizontal justifyContent="space-around" style={{ width: 300 }}>
<Button padded primary style={{ width: 120 }} onClick={this.handleInstallApp}>
<Button padded primary style={{ minWidth: 120 }} onClick={this.handleInstallApp}>
{t('app:emptyState.dashboard.buttons.installApp')}
</Button>
<Button
padded
primary
style={{ width: 120 }}
style={{ minWidth: 120 }}
onClick={() => openModal(MODAL_ADD_ACCOUNTS)}
>
{t('app:emptyState.dashboard.buttons.addAccount')}
@ -78,6 +78,7 @@ export const Description = styled(Box).attrs({
color: p => p.theme.colors.graphite,
})`
margin: 10px auto 25px;
display: block;
`
export default compose(
connect(

2
src/components/DeviceConnect/index.js

@ -131,7 +131,7 @@ const StepCheck = ({ checked, hasErrors }: { checked: boolean, hasErrors?: boole
<IconExclamationCircle size={16} />
</Box>
) : (
<Spinner size={16} />
<Spinner color="grey" size={16} />
)}
</Box>
)

8
src/components/TopBar/ActivityIndicator.js

@ -17,7 +17,7 @@ import { Rotating } from 'components/base/Spinner'
import Tooltip from 'components/base/Tooltip'
import TranslatedError from 'components/TranslatedError'
import Box from 'components/base/Box'
import IconRefresh from 'icons/Refresh'
import IconLoader from 'icons/Loader'
import IconExclamationCircle from 'icons/ExclamationCircle'
import IconCheckCircle from 'icons/CheckCircle'
import ItemContainer from './ItemContainer'
@ -88,18 +88,18 @@ class ActivityIndicatorInner extends PureComponent<Props, State> {
<Rotating
size={16}
isRotating={isRotating}
color={isError ? 'alertRed' : isRotating ? undefined : 'positiveGreen'}
color={isError ? 'alertRed' : isRotating ? 'grey' : 'positiveGreen'}
>
{isError ? (
<IconExclamationCircle size={16} />
) : isRotating ? (
<IconRefresh size={16} />
<IconLoader size={16} />
) : (
<IconCheckCircle size={16} />
)}
</Rotating>
<Box
ml={1}
ml={isRotating ? 2 : 1}
ff="Open Sans|SemiBold"
color={isError ? 'alertRed' : undefined}
fontSize={4}

4
src/components/base/Spinner.js

@ -11,14 +11,14 @@ const rotate = keyframes`
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
transform: rotate(-360deg);
}
`
export const Rotating = styled(Box)`
width: ${p => p.size}px;
height: ${p => p.size}px;
animation: ${p => (p.isRotating === false ? 'none' : `${rotate} 1.5s linear infinite`)};
animation: ${p => (p.isRotating === false ? 'none' : `${rotate} 1s linear infinite`)};
transition: 100ms linear transform;
`

4
src/icons/Loader.js

@ -5,12 +5,12 @@ import React from 'react'
const path = (
<path
fill="currentColor"
d="M16.735 2.8c0-.69864021.5663598-1.265 1.265-1.265.6986402 0 1.265.56635979 1.265 1.265v6.4c0 .69864021-.5663598 1.265-1.265 1.265-.6986402 0-1.265-.56635979-1.265-1.265V2.8zm11.118533 3.55748685c.4940132-.49401323 1.2949669-.49401323 1.7889802 0 .4940132.49401323.4940132 1.29496693 0 1.78898016l-4.5254834 4.52548339c-.4940133.4940132-1.294967.4940132-1.7889802 0-.4940132-.4940132-.4940132-1.2949669 0-1.7889802l4.5254834-4.52548335zM33.2 16.735c.6986402 0 1.265.5663598 1.265 1.265 0 .6986402-.5663598 1.265-1.265 1.265h-6.4c-.6986402 0-1.265-.5663598-1.265-1.265 0-.6986402.5663598-1.265 1.265-1.265h6.4zm-3.5574868 11.118533c.4940132.4940132.4940132 1.2949669 0 1.7889802-.4940133.4940132-1.294967.4940132-1.7889802 0l-4.5254834-4.5254834c-.4940132-.4940133-.4940132-1.294967 0-1.7889802.4940132-.4940132 1.2949669-.4940132 1.7889802 0l4.5254834 4.5254834zM19.265 33.2c0 .6986402-.5663598 1.265-1.265 1.265-.6986402 0-1.265-.5663598-1.265-1.265v-6.4c0-.6986402.5663598-1.265 1.265-1.265.6986402 0 1.265.5663598 1.265 1.265v6.4zM8.14646701 29.6425132c-.49401323.4940132-1.29496693.4940132-1.78898016 0-.49401323-.4940133-.49401323-1.294967 0-1.7889802l4.52548335-4.5254834c.4940133-.4940132 1.294967-.4940132 1.7889802 0 .4940132.4940132.4940132 1.2949669 0 1.7889802l-4.52548339 4.5254834zM2.8 19.265c-.69864021 0-1.265-.5663598-1.265-1.265 0-.6986402.56635979-1.265 1.265-1.265h6.4c.69864021 0 1.265.5663598 1.265 1.265 0 .6986402-.56635979 1.265-1.265 1.265H2.8zM6.35748685 8.14646701c-.49401323-.49401323-.49401323-1.29496693 0-1.78898016.49401323-.49401323 1.29496693-.49401323 1.78898016 0l4.52548339 4.52548335c.4940132.4940133.4940132 1.294967 0 1.7889802-.4940132.4940132-1.2949669.4940132-1.7889802 0L6.35748685 8.14646701z"
d="M6.21808178,10.568167 C6.29564085,10.646177 6.29564085,10.7721786 6.21808178,10.8501886 L3.41980765,13.6647327 C3.11714476,13.9691553 2.62761129,13.9691553 2.3088625,13.648082 C-0.781445169,10.5004576 -0.766649034,5.44541442 2.33562933,2.32509858 C3.62511827,1.02811219 5.29557344,0.224617325 7.0902708,0.0248347769 C7.11281081,0.0223256621 7.14363339,0.0194413329 7.18273852,0.0161817893 C7.18838484,0.0157111502 7.19404861,0.0154808067 7.19971449,0.0154913829 C7.31010352,0.0156974391 7.39942447,0.105352473 7.39921842,0.215741505 L7.39934104,0.215741734 C7.39933225,0.220451344 7.39932355,0.225162829 7.39931495,0.22987619 L7.39917604,0.297792241 L7.39689423,1.39301009 C7.39668097,1.49537103 7.3192192,1.58105138 7.21739792,1.5915507 L7.21739667,1.5915385 C7.08762335,1.6049201 6.99288857,1.61650089 6.9331923,1.62628085 C5.6096232,1.84311957 4.38939863,2.46988645 3.43048859,3.43437186 C1.32425889,5.55284776 0.954959082,8.8321462 2.48386083,11.3559771 L2.87521099,12.0019974 L5.11758667,9.74658395 C5.11785916,9.74630987 5.11813246,9.74603658 5.11840654,9.74576408 C5.19673747,9.66788595 5.32336994,9.66825302 5.40124806,9.74658395 L6.21808178,10.568167 Z M10.8824133,6.25341605 C10.8821408,6.25369013 10.8818675,6.25396342 10.8815935,6.25423592 C10.8032625,6.33211405 10.6766301,6.33174698 10.5987519,6.25341605 L9.78191822,5.43183304 C9.70435915,5.35382302 9.70435915,5.2278214 9.78191822,5.14981139 L12.5801923,2.33526733 C12.8828552,2.03084467 13.3723887,2.03084467 13.6911375,2.35191801 C16.7814452,5.49954242 16.766649,10.5545856 13.6643707,13.6749014 C12.3748817,14.9718878 10.7044266,15.7753827 8.9097292,15.9751652 C8.88719047,15.9776742 8.85637012,15.9805583 8.81726815,15.9838177 C8.81159834,15.9842903 8.80591096,15.9845209 8.8002215,15.984509 C8.68966856,15.9842776 8.60023526,15.8944692 8.60046664,15.7839163 L8.60310406,14.606988 C8.60331829,14.5046269 8.68078047,14.4189469 8.7826019,14.4084476 L8.78260333,14.4084615 C8.91237665,14.3950799 9.00711143,14.3834991 9.0668077,14.3737191 C10.3903768,14.1568804 11.6106014,13.5301135 12.5695114,12.5656281 C14.6757411,10.4471522 15.0450409,7.1678538 13.5161392,4.64402293 L13.124789,3.99800259 L10.8824133,6.25341605 Z"
/>
)
export default ({ size, ...p }: { size: number }) => (
<svg viewBox="0 0 36 36" height={size} width={size} {...p}>
<svg viewBox="0 0 16 16" height={size} width={size} {...p}>
{path}
</svg>
)

2
src/renderer/createStore.js

@ -20,7 +20,7 @@ export default ({ state, history, dbMiddleware }: Props) => {
history = createHistory()
}
const middlewares = [routerMiddleware(history), thunk, logger]
if (!__STORYBOOK_ENV__) {
if (!process.env.STORYBOOK_ENV) {
middlewares.push(require('middlewares/sentry').default)
}
if (dbMiddleware) {

4
static/i18n/en/app.yml

@ -39,7 +39,7 @@ common:
lostPassword: I lost my password
sync:
syncing: Synchronizing...
upToDate: Live
upToDate: Up to date
error: Synchronization error
refresh: Refresh
ago: Synced {{time}}
@ -75,7 +75,7 @@ account:
lastOperations: Last operations
emptyState:
title: No funds yet?
desc: Make sure the [cryptocurrency] app is installed to receive funds. # replace [cryptocurrency] and make it bold
desc: Make sure the <1><0>{{currency}}</0></1> app is installed to receive funds. # replace [cryptocurrency] and make it bold
buttons:
receiveFunds: Receive funds
settings:

Loading…
Cancel
Save