|
|
@ -2,7 +2,7 @@ import * as classNames from "classnames"; |
|
|
|
import { observer } from "mobx-react"; |
|
|
|
import { observer } from "mobx-react"; |
|
|
|
import * as React from "react"; |
|
|
|
import * as React from "react"; |
|
|
|
import { Link } from "react-router-dom"; |
|
|
|
import { Link } from "react-router-dom"; |
|
|
|
import { Grid, Header, Icon, Item, SemanticICONS } from "semantic-ui-react"; |
|
|
|
import { Grid, Header, Icon, Item, SemanticICONS, Dimmer, Segment } from "semantic-ui-react"; |
|
|
|
|
|
|
|
|
|
|
|
import { DeviceImage } from "@client/components"; |
|
|
|
import { DeviceImage } from "@client/components"; |
|
|
|
import * as p from "@client/pages"; |
|
|
|
import * as p from "@client/pages"; |
|
|
@ -87,11 +87,13 @@ class DeviceView extends React.Component<DeviceViewProps> { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
const { connectionState, sectionRunner, sections } = this.device; |
|
|
|
const { connectionState, sectionRunner, sections } = this.device; |
|
|
|
|
|
|
|
const dimmed = !connectionState.isDeviceConnected; |
|
|
|
if (!connectionState.isAvailable || inList) { |
|
|
|
if (!connectionState.isAvailable || inList) { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<React.Fragment> |
|
|
|
<Dimmer.Dimmable blurring dimmed={dimmed} className="device-body"> |
|
|
|
|
|
|
|
<Dimmer active={dimmed} /> |
|
|
|
<Grid> |
|
|
|
<Grid> |
|
|
|
<Grid.Column mobile="16" tablet="16" computer="16" largeScreen="6"> |
|
|
|
<Grid.Column mobile="16" tablet="16" computer="16" largeScreen="6"> |
|
|
|
<SectionRunnerView |
|
|
|
<SectionRunnerView |
|
|
@ -115,7 +117,7 @@ class DeviceView extends React.Component<DeviceViewProps> { |
|
|
|
path={route.program(":deviceId", ":programId")} |
|
|
|
path={route.program(":deviceId", ":programId")} |
|
|
|
component={p.ProgramPage} |
|
|
|
component={p.ProgramPage} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</React.Fragment> |
|
|
|
</Dimmer.Dimmable> |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|