2016-11-07 20:24:38 +00:00
|
|
|
import React, {PropTypes} from 'react';
|
|
|
|
|
|
|
|
const SettingsGeneral = ({settings, updateSetting}) => (
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<input
|
2016-11-16 17:18:39 +00:00
|
|
|
id="setting-follow-redirects"
|
2016-11-07 20:24:38 +00:00
|
|
|
type="checkbox"
|
2016-11-16 17:18:39 +00:00
|
|
|
checked={settings.followRedirects}
|
|
|
|
onChange={e => updateSetting('followRedirects', e.target.checked)}
|
2016-11-07 20:24:38 +00:00
|
|
|
/>
|
|
|
|
|
2016-11-16 17:18:39 +00:00
|
|
|
<label htmlFor="setting-follow-redirects">
|
|
|
|
Follow redirects automatically
|
2016-11-07 20:24:38 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
2016-11-16 17:18:39 +00:00
|
|
|
<div>
|
2016-11-07 20:24:38 +00:00
|
|
|
<input
|
2016-11-16 17:18:39 +00:00
|
|
|
id="setting-validate-ssl"
|
2016-11-07 20:24:38 +00:00
|
|
|
type="checkbox"
|
2016-11-16 17:18:39 +00:00
|
|
|
checked={settings.validateSSL}
|
|
|
|
onChange={e => updateSetting('validateSSL', e.target.checked)}
|
2016-11-07 20:24:38 +00:00
|
|
|
/>
|
|
|
|
|
2016-11-16 17:18:39 +00:00
|
|
|
<label htmlFor="setting-validate-ssl">
|
|
|
|
Validate SSL Certificates
|
2016-11-07 20:24:38 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
2016-11-16 17:18:39 +00:00
|
|
|
<div>
|
2016-11-07 20:24:38 +00:00
|
|
|
<input
|
2016-11-16 17:18:39 +00:00
|
|
|
id="setting-show-passwords"
|
2016-11-07 20:24:38 +00:00
|
|
|
type="checkbox"
|
2016-11-16 17:18:39 +00:00
|
|
|
checked={settings.showPasswords}
|
|
|
|
onChange={e => updateSetting('showPasswords', e.target.checked)}
|
2016-11-07 20:24:38 +00:00
|
|
|
/>
|
|
|
|
|
2016-11-16 17:18:39 +00:00
|
|
|
<label htmlFor="setting-show-passwords">
|
|
|
|
Show passwords in plain-text
|
2016-11-07 20:24:38 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
2016-11-16 17:18:39 +00:00
|
|
|
<div>
|
2016-11-07 20:24:38 +00:00
|
|
|
<input
|
2016-11-16 17:18:39 +00:00
|
|
|
id="setting-bulk-header-editor"
|
2016-11-07 20:24:38 +00:00
|
|
|
type="checkbox"
|
2016-11-16 17:18:39 +00:00
|
|
|
checked={settings.useBulkHeaderEditor}
|
|
|
|
onChange={e => updateSetting('useBulkHeaderEditor', e.target.checked)}
|
2016-11-07 20:24:38 +00:00
|
|
|
/>
|
|
|
|
|
2016-11-16 17:18:39 +00:00
|
|
|
<label htmlFor="setting-bulk-header-editor">
|
|
|
|
Use bulk header editor by default
|
2016-11-07 20:24:38 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
2016-11-16 17:18:39 +00:00
|
|
|
<input
|
|
|
|
id="setting-stacked-layout"
|
|
|
|
type="checkbox"
|
|
|
|
checked={settings.forceVerticalLayout}
|
|
|
|
onChange={e => updateSetting('forceVerticalLayout', e.target.checked)}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<label htmlFor="setting-stacked-layout">
|
|
|
|
Always use vertical layout
|
2016-11-07 20:24:38 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<input
|
|
|
|
id="setting-editor-line-wrapping"
|
|
|
|
type="checkbox"
|
|
|
|
checked={settings.editorLineWrapping}
|
|
|
|
onChange={e => updateSetting('editorLineWrapping', e.target.checked)}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<label htmlFor="setting-editor-line-wrapping">
|
|
|
|
Wrap Long Lines
|
|
|
|
</label>
|
|
|
|
</div>
|
2016-11-16 17:18:39 +00:00
|
|
|
|
2016-11-07 20:24:38 +00:00
|
|
|
<div>
|
|
|
|
<label htmlFor="setting-editor-font-size" className="pad-top">
|
2016-11-16 17:18:39 +00:00
|
|
|
Code Editor Font Size (px)
|
2016-11-07 20:24:38 +00:00
|
|
|
</label>
|
|
|
|
<div className="form-control form-control--outlined no-margin">
|
|
|
|
<input
|
|
|
|
id="setting-editor-font-size"
|
|
|
|
type="number"
|
|
|
|
min={8}
|
|
|
|
max={20}
|
|
|
|
value={settings.editorFontSize}
|
|
|
|
onChange={e => updateSetting('editorFontSize', parseInt(e.target.value, 10))}
|
|
|
|
/>
|
|
|
|
</div>
|
2016-11-16 17:18:39 +00:00
|
|
|
|
|
|
|
<div>
|
|
|
|
<label htmlFor="setting-request-timeout" className="pad-top">
|
|
|
|
Request Timeout (ms) (0 for no timeout)
|
|
|
|
</label>
|
|
|
|
<div className="form-control form-control--outlined no-margin">
|
|
|
|
<input
|
|
|
|
id="setting-request-timeout"
|
|
|
|
type="number"
|
|
|
|
min={0}
|
|
|
|
value={settings.timeout}
|
|
|
|
onChange={e => updateSetting('timeout', parseInt(e.target.value, 10))}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-11-07 20:24:38 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
<h2 className="txt-md pad-top-sm">
|
|
|
|
<label className="label--small">Network Proxy (Experimental)</label>
|
|
|
|
</h2>
|
|
|
|
<div>
|
2016-11-16 17:18:39 +00:00
|
|
|
<div className="inline-block" style={{width: '50%'}}>
|
|
|
|
<label htmlFor="setting-http-proxy">
|
|
|
|
HTTP Proxy
|
|
|
|
</label>
|
|
|
|
<div className="form-control form-control--outlined no-margin">
|
|
|
|
<input
|
|
|
|
id="setting-http-proxy"
|
|
|
|
type="string"
|
|
|
|
placeholder="localhost:8005"
|
|
|
|
defaultValue={settings.httpProxy}
|
|
|
|
onChange={e => updateSetting('httpProxy', e.target.value)}
|
|
|
|
/>
|
|
|
|
</div>
|
2016-11-07 20:24:38 +00:00
|
|
|
</div>
|
2016-11-16 17:18:39 +00:00
|
|
|
<div className="inline-block" style={{width: '50%'}}>
|
|
|
|
<div className="pad-left-half">
|
|
|
|
<label htmlFor="setting-https-proxy">
|
|
|
|
HTTPS Proxy
|
|
|
|
</label>
|
|
|
|
<div className="form-control form-control--outlined no-margin">
|
|
|
|
<input
|
|
|
|
id="setting-https-proxy"
|
|
|
|
placeholder="localhost:8005"
|
|
|
|
type="string"
|
|
|
|
defaultValue={settings.httpsProxy}
|
|
|
|
onChange={e => updateSetting('httpsProxy', e.target.value)}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-11-07 20:24:38 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<br/>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
|
|
|
|
SettingsGeneral.propTypes = {
|
|
|
|
settings: PropTypes.object.isRequired,
|
|
|
|
updateSetting: PropTypes.func.isRequired
|
|
|
|
};
|
|
|
|
|
|
|
|
export default SettingsGeneral;
|