2016-07-07 20:10:55 +00:00
|
|
|
import React, {Component} from 'react'
|
|
|
|
import {Tab, Tabs, TabList, TabPanel} from 'react-tabs'
|
|
|
|
import {shell} from 'electron'
|
2016-05-07 17:29:24 +00:00
|
|
|
|
2016-07-07 20:10:55 +00:00
|
|
|
import Link from './base/Link'
|
2016-05-07 17:29:24 +00:00
|
|
|
import Modal from './base/Modal'
|
|
|
|
import ModalBody from './base/ModalBody'
|
|
|
|
import ModalHeader from './base/ModalHeader'
|
|
|
|
import ModalFooter from './base/ModalFooter'
|
|
|
|
import {MODAL_SETTINGS} from '../lib/constants'
|
2016-07-07 20:10:55 +00:00
|
|
|
import {MASHAPE_URL} from '../lib/constants'
|
|
|
|
import {getVersion} from '../lib/appInfo'
|
2016-05-07 17:29:24 +00:00
|
|
|
|
|
|
|
class SettingsModal extends Component {
|
2016-07-07 20:10:55 +00:00
|
|
|
show () {
|
2016-07-06 20:18:26 +00:00
|
|
|
this.refs.modal.show();
|
|
|
|
}
|
|
|
|
|
2016-07-07 20:10:55 +00:00
|
|
|
toggle () {
|
2016-07-06 20:18:26 +00:00
|
|
|
this.refs.modal.toggle();
|
|
|
|
}
|
|
|
|
|
2016-07-07 20:10:55 +00:00
|
|
|
render () {
|
2016-05-07 17:29:24 +00:00
|
|
|
return (
|
2016-07-07 20:10:55 +00:00
|
|
|
<Modal ref="modal" tall={true} {...this.props}>
|
|
|
|
<ModalHeader>Insomnia Settings</ModalHeader>
|
|
|
|
<ModalBody>
|
|
|
|
<Tabs>
|
|
|
|
<TabList>
|
|
|
|
<Tab>
|
|
|
|
<button>General</button>
|
|
|
|
</Tab>
|
|
|
|
<Tab>
|
|
|
|
<button>Import/Export</button>
|
|
|
|
</Tab>
|
|
|
|
<Tab>
|
|
|
|
<button>Editor</button>
|
|
|
|
</Tab>
|
|
|
|
<Tab>
|
|
|
|
<button>Hotkeys</button>
|
|
|
|
</Tab>
|
|
|
|
<Tab>
|
|
|
|
<button>About v{getVersion()}</button>
|
|
|
|
</Tab>
|
|
|
|
</TabList>
|
|
|
|
<TabPanel className="pad">
|
|
|
|
<div>
|
|
|
|
<input id="setting-show-passwords" type="checkbox"/>
|
|
|
|
<label htmlFor="setting-show-passwords">
|
|
|
|
Show HTTP authentication passwords in plain-text
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div className="pad-top">
|
|
|
|
<input id="setting-bulk-header-edit" type="checkbox"/>
|
|
|
|
<label htmlFor="setting-bulk-header-edit">
|
|
|
|
Use bulk header editor by default
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<label htmlFor="setting-request-timeout" className="pad-top">
|
|
|
|
Request Timeout (milliseconds)
|
|
|
|
</label>
|
|
|
|
<div className="form-control form-control--outlined no-marg">
|
|
|
|
<input id="setting-request-timeout" type="text" defaultValue={30000}/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<br/>
|
|
|
|
</TabPanel>
|
|
|
|
<TabPanel className="pad">
|
|
|
|
Import/Export
|
|
|
|
</TabPanel>
|
|
|
|
<TabPanel className="pad">
|
|
|
|
Editor
|
|
|
|
</TabPanel>
|
|
|
|
<TabPanel className="pad">
|
|
|
|
Keyboard
|
|
|
|
</TabPanel>
|
|
|
|
<TabPanel className="pad">
|
|
|
|
<p>
|
|
|
|
<Link href="http://insomnia.rest">Insomnia</Link> is made with love by me,
|
|
|
|
<Link href="http://schier.co">Gregory Schier</Link>.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
You can help me out by sending your feedback to
|
|
|
|
<Link href="mailto:greg@schier.co">greg@schier.co</Link> or tweet
|
|
|
|
<Link href="https://twitter.com/GetInsomnia">@GetInsomnia</Link>.
|
|
|
|
</p>
|
|
|
|
<p>Thanks!</p>
|
|
|
|
<br/>
|
|
|
|
<p>~Gregory</p>
|
|
|
|
</TabPanel>
|
|
|
|
</Tabs>
|
2016-05-07 17:29:24 +00:00
|
|
|
</ModalBody>
|
2016-07-07 20:10:55 +00:00
|
|
|
<ModalFooter className="pad text-right">
|
|
|
|
<div className="relative">
|
|
|
|
Supported By
|
|
|
|
<Link href={MASHAPE_URL}>
|
|
|
|
<img src="images/mashape.png" style={{height: '1.5em'}} className="valign-bottom"/>
|
|
|
|
</Link>
|
|
|
|
</div>
|
|
|
|
</ModalFooter>
|
2016-05-07 17:29:24 +00:00
|
|
|
</Modal>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-07-06 20:18:26 +00:00
|
|
|
SettingsModal.propTypes = {};
|
2016-05-07 17:29:24 +00:00
|
|
|
|
|
|
|
SettingsModal.defaultProps = {
|
|
|
|
id: MODAL_SETTINGS
|
|
|
|
};
|
|
|
|
|
|
|
|
export default SettingsModal;
|