|
|
|
@ -26,9 +26,9 @@ const GETDEVICES = gql` |
|
|
|
${deviceInfoFragment} |
|
|
|
${deviceInfoFragment} |
|
|
|
`;
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
|
|
const CONNECT = gql` |
|
|
|
const START = gql` |
|
|
|
mutation connect { |
|
|
|
mutation start { |
|
|
|
connect |
|
|
|
start |
|
|
|
} |
|
|
|
} |
|
|
|
`;
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
|
|
@ -51,14 +51,9 @@ const useIndiState = () => { |
|
|
|
|
|
|
|
|
|
|
|
const Devices = () => { |
|
|
|
const Devices = () => { |
|
|
|
//const connected = useIndiState();
|
|
|
|
//const connected = useIndiState();
|
|
|
|
const { data } = useQuery(GETDEVICES); |
|
|
|
const [connect] = useMutation(START); |
|
|
|
const [connect] = useMutation(CONNECT); |
|
|
|
|
|
|
|
const [disconnect] = useMutation(DISCONNECT); |
|
|
|
const [disconnect] = useMutation(DISCONNECT); |
|
|
|
|
|
|
|
|
|
|
|
if (!data || !data.devices) { |
|
|
|
|
|
|
|
return <div>No data</div>; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<Box fill background="light-3"> |
|
|
|
<Box fill background="light-3"> |
|
|
|
<Header background="brand" pad="small"> |
|
|
|
<Header background="brand" pad="small"> |
|
|
|
@ -85,6 +80,7 @@ const Devices = () => { |
|
|
|
}} |
|
|
|
}} |
|
|
|
/> |
|
|
|
/> |
|
|
|
)} |
|
|
|
)} |
|
|
|
|
|
|
|
<Button icon={<Contact />} onClick={() => {}} /> |
|
|
|
</Box> |
|
|
|
</Box> |
|
|
|
</Header> |
|
|
|
</Header> |
|
|
|
|
|
|
|
|
|
|
|
|