meriadec
7 years ago
No known key found for this signature in database
GPG Key ID: 1D2FC2305E2CB399
3 changed files with
17 additions and
6 deletions
-
src/components/ManagerPage/AppsList.js
-
src/components/ManagerPage/ManagerApp.js
-
static/i18n/en/manager.yml
|
|
@ -2,13 +2,14 @@ |
|
|
|
|
|
|
|
import React, { PureComponent } from 'react' |
|
|
|
import styled from 'styled-components' |
|
|
|
import { translate } from 'react-i18next' |
|
|
|
|
|
|
|
import { runJob } from 'renderer/events' |
|
|
|
|
|
|
|
import Box from 'components/base/Box' |
|
|
|
import Modal, { ModalBody } from 'components/base/Modal' |
|
|
|
|
|
|
|
import type { Device } from 'types/common' |
|
|
|
import type { Device, T } from 'types/common' |
|
|
|
|
|
|
|
import ManagerApp from './ManagerApp' |
|
|
|
|
|
|
@ -42,6 +43,7 @@ type LedgerApp = { |
|
|
|
|
|
|
|
type Props = { |
|
|
|
device: Device, |
|
|
|
t: T, |
|
|
|
} |
|
|
|
|
|
|
|
type State = { |
|
|
@ -152,11 +154,12 @@ class AppsList extends PureComponent<Props, State> { |
|
|
|
} |
|
|
|
|
|
|
|
render() { |
|
|
|
const { t } = this.props |
|
|
|
return ( |
|
|
|
<Box flow={6}> |
|
|
|
<Box> |
|
|
|
<Box mb={4} color="dark" ff="Museo Sans" fontSize={6}> |
|
|
|
{'All apps'} |
|
|
|
{t('manager:allApps')} |
|
|
|
</Box> |
|
|
|
{this.renderList()} |
|
|
|
</Box> |
|
|
@ -165,4 +168,4 @@ class AppsList extends PureComponent<Props, State> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
export default AppsList |
|
|
|
export default translate()(AppsList) |
|
|
|
|
|
@ -2,6 +2,9 @@ |
|
|
|
|
|
|
|
import React from 'react' |
|
|
|
import styled from 'styled-components' |
|
|
|
import { translate } from 'react-i18next' |
|
|
|
|
|
|
|
import type { T } from 'types/common' |
|
|
|
|
|
|
|
import Box from 'components/base/Box' |
|
|
|
import Text from 'components/base/Text' |
|
|
@ -40,6 +43,7 @@ const AppName = styled(Box).attrs({ |
|
|
|
` |
|
|
|
|
|
|
|
type Props = { |
|
|
|
t: T, |
|
|
|
name: string, |
|
|
|
version: string, |
|
|
|
icon: string, |
|
|
@ -47,8 +51,8 @@ type Props = { |
|
|
|
// onUninstall: Function,
|
|
|
|
} |
|
|
|
|
|
|
|
export default function ManagerApp(props: Props) { |
|
|
|
const { name, version, icon, onInstall } = props |
|
|
|
function ManagerApp(props: Props) { |
|
|
|
const { name, version, icon, onInstall, t } = props |
|
|
|
const iconUrl = `https://api.ledgerwallet.com/update/assets/icons/${icon}` |
|
|
|
return ( |
|
|
|
<Container> |
|
|
@ -60,8 +64,10 @@ export default function ManagerApp(props: Props) { |
|
|
|
</Text> |
|
|
|
</Box> |
|
|
|
<Button outline onClick={onInstall}> |
|
|
|
{'Install'} |
|
|
|
{t('manager:install')} |
|
|
|
</Button> |
|
|
|
</Container> |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
|
|
export default translate()(ManagerApp) |
|
|
|
|
|
@ -1,3 +1,5 @@ |
|
|
|
tabs: |
|
|
|
apps: Apps |
|
|
|
device: My device |
|
|
|
install: Install |
|
|
|
allApps: All apps |
|
|
|