Browse Source
Display device informations and enable/disable firmware update based on env
master
meriadec
7 years ago
No known key found for this signature in database
GPG Key ID: 1D2FC2305E2CB399
2 changed files with
7 additions and
11 deletions
-
src/components/ManagerPage/Dashboard.js
-
src/components/ManagerPage/UpdateFirmwareButton.js
|
|
@ -2,7 +2,6 @@ |
|
|
|
import React from 'react' |
|
|
|
import { translate } from 'react-i18next' |
|
|
|
|
|
|
|
import { EXPERIMENTAL_FIRMWARE_UPDATE } from 'config/constants' |
|
|
|
import type { T, Device } from 'types/common' |
|
|
|
|
|
|
|
import Box from 'components/base/Box' |
|
|
@ -35,15 +34,10 @@ const Dashboard = ({ device, deviceInfo, t }: Props) => ( |
|
|
|
</Text> |
|
|
|
</Box> |
|
|
|
<Box mt={5}> |
|
|
|
{EXPERIMENTAL_FIRMWARE_UPDATE ? ( |
|
|
|
<FirmwareUpdate |
|
|
|
infos={{ |
|
|
|
targetId: deviceInfo.targetId, |
|
|
|
version: deviceInfo.version, |
|
|
|
}} |
|
|
|
device={device} |
|
|
|
/> |
|
|
|
) : null} |
|
|
|
<FirmwareUpdate |
|
|
|
infos={{ targetId: deviceInfo.targetId, version: deviceInfo.version }} |
|
|
|
device={device} |
|
|
|
/> |
|
|
|
</Box> |
|
|
|
<Box mt={5}> |
|
|
|
<AppsList device={device} targetId={deviceInfo.targetId} version={deviceInfo.version} /> |
|
|
|
|
|
@ -4,6 +4,8 @@ import { translate } from 'react-i18next' |
|
|
|
|
|
|
|
import type { T } from 'types/common' |
|
|
|
|
|
|
|
import { EXPERIMENTAL_FIRMWARE_UPDATE } from 'config/constants' |
|
|
|
|
|
|
|
import Button from 'components/base/Button' |
|
|
|
import Text from 'components/base/Text' |
|
|
|
import { getCleanVersion } from 'components/ManagerPage/FirmwareUpdate' |
|
|
@ -25,7 +27,7 @@ const UpdateFirmwareButton = ({ t, firmware, installFirmware }: Props) => |
|
|
|
<Text ff="Open Sans|Regular" fontSize={4} style={{ marginLeft: 'auto', marginRight: 15 }}> |
|
|
|
{t('app:manager.firmware.latest', { version: getCleanVersion(firmware.name) })} |
|
|
|
</Text> |
|
|
|
<Button primary onClick={installFirmware}> |
|
|
|
<Button primary onClick={installFirmware} disabled={!EXPERIMENTAL_FIRMWARE_UPDATE}> |
|
|
|
{t('app:manager.firmware.update')} |
|
|
|
</Button> |
|
|
|
</Fragment> |
|
|
|