2016-11-07 20:24:38 +00:00
|
|
|
import React, {PropTypes} from 'react';
|
2016-11-16 17:18:39 +00:00
|
|
|
import {Dropdown, DropdownButton, DropdownItem, DropdownDivider} from '../base/dropdown';
|
2016-12-01 00:02:35 +00:00
|
|
|
import Link from '../base/Link';
|
2016-11-07 20:24:38 +00:00
|
|
|
|
2016-11-16 17:18:39 +00:00
|
|
|
const SettingsImportExport = ({
|
|
|
|
handleImport,
|
|
|
|
handleExportAll,
|
|
|
|
handleExportWorkspace
|
|
|
|
}) => (
|
2016-11-29 20:55:31 +00:00
|
|
|
<div>
|
|
|
|
<h1 className="no-margin-top">Data Import and Export</h1>
|
2016-11-07 20:24:38 +00:00
|
|
|
<p>
|
2016-11-30 23:11:36 +00:00
|
|
|
Import format will be automatically detected (<strong>Insomnia, Postman v2, HAR, Curl</strong>)
|
2016-11-07 20:24:38 +00:00
|
|
|
</p>
|
2016-12-01 00:02:35 +00:00
|
|
|
<p>
|
|
|
|
Don't see your format here?
|
|
|
|
{" "}
|
|
|
|
<Link href="https://insomnia.rest/documentation/import-export">Add Your Own</Link>.
|
|
|
|
</p>
|
|
|
|
<div className="pad-top">
|
2017-03-01 21:15:56 +00:00
|
|
|
<Dropdown outline>
|
2016-12-01 00:02:35 +00:00
|
|
|
<DropdownButton className="btn btn--clicky">
|
|
|
|
Export Data <i className="fa fa-caret-down"></i>
|
|
|
|
</DropdownButton>
|
2016-12-21 23:37:48 +00:00
|
|
|
<DropdownDivider>Choose Export Type</DropdownDivider>
|
2016-12-01 03:54:26 +00:00
|
|
|
<DropdownItem onClick={handleExportWorkspace}>
|
2016-12-01 00:02:35 +00:00
|
|
|
<i className="fa fa-home"></i>
|
|
|
|
Current Workspace
|
|
|
|
</DropdownItem>
|
2016-12-01 03:54:26 +00:00
|
|
|
<DropdownItem onClick={handleExportAll}>
|
2016-12-01 00:02:35 +00:00
|
|
|
<i className="fa fa-empty"></i>
|
|
|
|
All Workspaces
|
|
|
|
</DropdownItem>
|
|
|
|
</Dropdown>
|
|
|
|
|
2016-12-01 03:54:26 +00:00
|
|
|
<button className="btn btn--clicky" onClick={handleImport}>
|
2016-12-01 00:02:35 +00:00
|
|
|
Import Data
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<p className="italic faint">
|
2016-11-19 07:11:10 +00:00
|
|
|
* Tip: You can also paste Curl commands into the URL bar
|
|
|
|
</p>
|
2016-11-07 20:24:38 +00:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
|
|
|
|
SettingsImportExport.propTypes = {
|
2016-11-16 17:18:39 +00:00
|
|
|
handleImport: PropTypes.func.isRequired,
|
|
|
|
handleExportAll: PropTypes.func.isRequired,
|
|
|
|
handleExportWorkspace: PropTypes.func.isRequired,
|
2016-11-07 20:24:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export default SettingsImportExport;
|