Valentin D. Pinkman
7 years ago
13 changed files with 189 additions and 84 deletions
@ -0,0 +1,82 @@ |
|||
// @flow
|
|||
import React, { Component } from 'react' |
|||
import styled, { keyframes } from 'styled-components' |
|||
|
|||
import Box from 'components/base/Box' |
|||
|
|||
const inifiteAnimation = keyframes` |
|||
0% { |
|||
left: 0 |
|||
} |
|||
100% { |
|||
left: 102% |
|||
} |
|||
` |
|||
|
|||
const fillInAnimation = keyframes` |
|||
0% { |
|||
transform: translate3d(-110%, 0, 0); |
|||
} |
|||
50% { |
|||
transform: translate3d(-30%, 0, 0); |
|||
} |
|||
100% { |
|||
transform: translate3d(0); |
|||
} |
|||
` |
|||
|
|||
const Bar = styled(Box).attrs({ |
|||
color: 'fog', |
|||
borderRadius: '2.5px', |
|||
})` |
|||
height: 5px; |
|||
width: 100%; |
|||
position: relative; |
|||
background-color: currentColor; |
|||
overflow: hidden; |
|||
` |
|||
|
|||
const Progression = styled(Bar).attrs({ |
|||
color: 'wallet', |
|||
})` |
|||
position: absolute; |
|||
top: 0; |
|||
left: 0; |
|||
${p => |
|||
p.infinite |
|||
? ` |
|||
animation: 1000ms ${inifiteAnimation} ease-out infinite; |
|||
` |
|||
: ` |
|||
animation: ${p.timing}ms ${fillInAnimation} ease-out; |
|||
animation-fill-mode: forwards; |
|||
`};
|
|||
` |
|||
|
|||
type Props = { |
|||
infinite: boolean, |
|||
timing?: number, |
|||
color?: string, |
|||
} |
|||
|
|||
type State = {} |
|||
|
|||
class Progress extends Component<Props, State> { |
|||
static defaultProps = { |
|||
infinite: false, |
|||
timing: 3000, |
|||
color: 'wallet', |
|||
} |
|||
|
|||
render() { |
|||
const { infinite, color, timing } = this.props |
|||
const styles = infinite ? { width: '20%' } : { width: '100%' } |
|||
return ( |
|||
<Bar> |
|||
<Progression infinite={infinite} color={color} style={styles} timing={timing} /> |
|||
</Bar> |
|||
) |
|||
} |
|||
} |
|||
|
|||
export default Progress |
@ -1,21 +0,0 @@ |
|||
tabs: |
|||
apps: Apps |
|||
device: My device |
|||
apps: |
|||
install: Install |
|||
all: Apps |
|||
help: To update an app, you have to uninstall the app and re install it. |
|||
firmware: |
|||
update: Update firmware |
|||
updateTitle: Firmware update |
|||
latest: A new firmware {{version}} is available |
|||
title: Manager |
|||
subtitle: Get all your apps here |
|||
device: |
|||
title: Plug your device |
|||
desc: Please connect your Ledger device and follow the steps below to access the manager |
|||
cta: Plug my device |
|||
errors: |
|||
noDevice: Please make sur your device is connected (TEMPLATE NEEDED) |
|||
noDashboard: Please make sure your device is on the dashboard screen (TEMPLATED NEEDED) |
|||
noGenuine: You did not approve request on your device or your device is not genuine (TEMPLATE NEEDED) |
Loading…
Reference in new issue