|
|
|
@ -23,16 +23,32 @@ const Acquire = (props: Props) => {
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
const acquireDeviceAction = {
|
|
|
|
|
label: 'Acquire device',
|
|
|
|
|
callback: () => {
|
|
|
|
|
props.acquireDevice()
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<section className="acquire">
|
|
|
|
|
<Notification
|
|
|
|
|
title="Device is used in other window"
|
|
|
|
|
message="Do you want to use your device in this window?"
|
|
|
|
|
className="info"
|
|
|
|
|
cancelable={false}
|
|
|
|
|
actions={actions}
|
|
|
|
|
/>
|
|
|
|
|
{props.acquiring ? (
|
|
|
|
|
<Notification
|
|
|
|
|
title="Device is being acquired"
|
|
|
|
|
message="Please wait"
|
|
|
|
|
className="loading"
|
|
|
|
|
cancelable={false}
|
|
|
|
|
loading={true}
|
|
|
|
|
/>
|
|
|
|
|
) : (
|
|
|
|
|
<Notification
|
|
|
|
|
title="Device is used in other window"
|
|
|
|
|
message="Do you want to use your device in this window?"
|
|
|
|
|
className="info"
|
|
|
|
|
cancelable={ false }
|
|
|
|
|
actions={ [acquireDeviceAction] }
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
</section>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|