2018-02-20 09:30:36 +00:00
|
|
|
/* @flow */
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
import React from 'react';
|
2018-05-05 11:52:03 +00:00
|
|
|
import type { Props } from './index';
|
2018-02-20 09:30:36 +00:00
|
|
|
|
2018-05-05 11:52:03 +00:00
|
|
|
const RememberDevice = (props: Props) => {
|
|
|
|
if (!props.modal.opened) return null;
|
2018-02-20 09:30:36 +00:00
|
|
|
const { device } = props.modal;
|
|
|
|
const { onCancel, onDuplicateDevice } = props.modalActions;
|
|
|
|
return (
|
2018-04-11 10:06:46 +00:00
|
|
|
<div className="duplicate">
|
|
|
|
<h3>Clone { device.instanceLabel }?</h3>
|
|
|
|
<p>This will create new instance of device which can be used with different passphrase</p>
|
|
|
|
<button onClick={ event => onDuplicateDevice( { ...device, instanceLabel: "TODO: user label from input" } ) }>Create new instance</button>
|
|
|
|
<button className="white" onClick={ onCancel }>Cancel</button>
|
2018-02-20 09:30:36 +00:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default RememberDevice;
|