Browse Source
temporarily disable the new API calls for firmware (current limitation: apps can install on firmware > 1.4)master
committed by
GitHub
4 changed files with 69 additions and 64 deletions
@ -1,58 +1,62 @@ |
|||||
// @flow
|
// @flow
|
||||
|
|
||||
import React, { Fragment } from 'react' |
// import React, { Fragment } from 'react'
|
||||
import { translate } from 'react-i18next' |
import React from 'react' |
||||
|
// import { translate } from 'react-i18next'
|
||||
|
|
||||
import type { Node } from 'react' |
import type { Node } from 'react' |
||||
import type { T, Device } from 'types/common' |
// import type { T, Device } from 'types/common'
|
||||
|
import type { Device } from 'types/common' |
||||
|
|
||||
import AppsList from './AppsList' |
import AppsList from './AppsList' |
||||
// import DeviceInfos from './DeviceInfos'
|
// import DeviceInfos from './DeviceInfos'
|
||||
import FirmwareUpdate from './FirmwareUpdate' |
// import FirmwareUpdate from './FirmwareUpdate'
|
||||
import EnsureDevice from './EnsureDevice' |
import EnsureDevice from './EnsureDevice' |
||||
import EnsureDashboard from './EnsureDashboard' |
// import EnsureDashboard from './EnsureDashboard'
|
||||
import EnsureGenuine from './EnsureGenuine' |
// import EnsureGenuine from './EnsureGenuine'
|
||||
|
|
||||
type DeviceInfo = { |
// type DeviceInfo = {
|
||||
targetId: number | string, |
// targetId: number | string,
|
||||
version: string, |
// version: string,
|
||||
final: boolean, |
// final: boolean,
|
||||
mcu: boolean, |
// mcu: boolean,
|
||||
} |
// }
|
||||
|
|
||||
type Props = { |
// type Props = {
|
||||
t: T, |
// t: T,
|
||||
} |
// }
|
||||
|
|
||||
const ManagerPage = ({ t }: Props): Node => ( |
// const ManagerPage = ({ t }: Props): Node => (
|
||||
<Fragment> |
// <EnsureDevice>
|
||||
<EnsureDevice> |
// {(device: Device) => (
|
||||
{(device: Device) => ( |
// <EnsureDashboard device={device}>
|
||||
<EnsureDashboard device={device}> |
// {(deviceInfo: DeviceInfo) => (
|
||||
{(deviceInfo: DeviceInfo) => ( |
// <Fragment>
|
||||
<Fragment> |
// {deviceInfo.mcu && <span> bootloader mode </span>}
|
||||
{deviceInfo.mcu && <span> bootloader mode </span>} |
// {deviceInfo.final && <span> osu mode </span>}
|
||||
{deviceInfo.final && <span> osu mode </span>} |
// {!deviceInfo.mcu &&
|
||||
{!deviceInfo.mcu && |
// !deviceInfo.final && (
|
||||
!deviceInfo.final && ( |
// <EnsureGenuine device={device} t={t}>
|
||||
<EnsureGenuine device={device} t={t}> |
// <FirmwareUpdate
|
||||
<FirmwareUpdate |
// infos={{
|
||||
infos={{ |
// targetId: deviceInfo.targetId,
|
||||
targetId: deviceInfo.targetId, |
// version: deviceInfo.version,
|
||||
version: deviceInfo.version, |
// }}
|
||||
}} |
// device={device}
|
||||
device={device} |
// t={t}
|
||||
t={t} |
// />
|
||||
/> |
// <AppsList device={device} targetId={deviceInfo.targetId} />
|
||||
<AppsList device={device} targetId={deviceInfo.targetId} /> |
// </EnsureGenuine>
|
||||
</EnsureGenuine> |
// )}
|
||||
)} |
// </Fragment>
|
||||
</Fragment> |
// )}
|
||||
)} |
// </EnsureDashboard>
|
||||
</EnsureDashboard> |
// )}
|
||||
)} |
// </EnsureDevice>
|
||||
</EnsureDevice> |
// )
|
||||
</Fragment> |
|
||||
|
const ManagerPage = (): Node => ( |
||||
|
<EnsureDevice>{(device: Device) => <AppsList device={device} />}</EnsureDevice> |
||||
) |
) |
||||
|
|
||||
export default translate()(ManagerPage) |
export default ManagerPage |
||||
|
Loading…
Reference in new issue