import React, {Component, PropTypes} from 'react'; import {connect} from 'react-redux' import {bindActionCreators} from 'redux'; import {Tab, Tabs, TabList, TabPanel} from 'react-tabs' import {shell} from 'electron'; import Input from '../base/Input'; import Link from '../base/Link'; import Modal from '../base/Modal'; import ModalBody from '../base/ModalBody'; import ModalHeader from '../base/ModalHeader'; import ModalFooter from '../base/ModalFooter'; import ModalComponent from '../lib/ModalComponent'; import * as GlobalActions from '../../redux/modules/global'; import * as db from '../../database'; import {MASHAPE_URL} from '../../lib/constants'; import {getAppVersion} from '../../lib/appInfo'; import {MOD_SYM} from '../../lib/constants'; import {getAppName, getAppLongName} from '../../lib/appInfo'; class SettingsTabs extends Component { _importFile () { const workspace = this._getActiveWorkspace(this.props); this.props.actions.global.importFile(workspace); this.props.hide(); } _exportFile () { this.props.actions.global.exportFile(); this.props.hide(); } _getActiveWorkspace (props) { // TODO: Factor this out into a selector const {entities, workspaces} = props || this.props; let workspace = entities.workspaces[workspaces.activeId]; if (!workspace) { workspace = entities.workspaces[Object.keys(entities.workspaces)[0]]; } return workspace; } render () { const {entities, selectedIndex} = this.props; const settings = entities.settings[Object.keys(entities.settings)[0]]; return ( = 0 ? selectedIndex : 0}>

db.settingsUpdate(settings, {showPasswords})} />   
db.settingsUpdate(settings, {followRedirects})} />   
{/*
*/} {/* db.settingsUpdate(settings, {useBulkHeaderEditor})}*/} {/*/>*/} {/*  */} {/**/} {/*
*/} {/*
*/} {/*  */} {/**/} {/*
*/}
db.settingsUpdate(settings, {timeout})} />

db.settingsUpdate(settings, {editorLineWrapping})} />   
db.settingsUpdate(settings, {editorFontSize})} />

Import or export your data, so you can share it or back it up.

{" "}

Use these shortcuts to improve your productivity.


Keyboard Shortcut Action
{MOD_SYM}P {MOD_SYM}K Quick Switch Requests
{MOD_SYM}Enter Send Request
{MOD_SYM}N New Request
{MOD_SYM}D Duplicate Request
{MOD_SYM}L Focus URL Bar
{MOD_SYM}, Show Settings

Why hello there!

{getAppName()} is made with love by me,  Gregory Schier.

You can help me out by sending your feedback to  greg@schier.co or tweet  @GetInsomnia.

Thanks!


~Gregory

); } } SettingsTabs.propTypes = { hide: PropTypes.func.isRequired, workspaces: PropTypes.shape({ activeId: PropTypes.string }), entities: PropTypes.shape({ workspaces: PropTypes.object.isRequired, settings: PropTypes.object.isRequired }).isRequired, actions: PropTypes.shape({ global: PropTypes.shape({ importFile: PropTypes.func.isRequired, exportFile: PropTypes.func.isRequired, }) }), // Optional selectedIndex: PropTypes.number }; function mapStateToProps (state) { return { workspaces: state.workspaces, entities: state.entities, actions: state.actions, loading: state.global.loading }; } function mapDispatchToProps (dispatch) { return { actions: { global: bindActionCreators(GlobalActions, dispatch) } } } // NOTE: We can't _connect_ the SettingsModal because it hides the public methods const ConnectedSettingsTabs = connect( mapStateToProps, mapDispatchToProps )(SettingsTabs); class SettingsModal extends ModalComponent { constructor (props) { super(props); this.state = { selectedIndex: 0 } } show (selectedIndex = 0) { super.show(); if (selectedIndex >= 0) { this.setState({selectedIndex}); } else { this.setState({selectedIndex: 0}); } } render () { const {selectedIndex} = this.state; return ( {getAppLongName()}    v{getAppVersion()} this.hide()} selectedIndex={selectedIndex}/>
Supported By  
); } } export default SettingsModal;