2016-11-07 20:24:38 +00:00
|
|
|
import React, {PropTypes} from 'react';
|
|
|
|
|
|
|
|
const SettingsGeneral = ({settings, updateSetting}) => (
|
|
|
|
<div>
|
2016-12-21 23:37:48 +00:00
|
|
|
<div className="form-control form-control--thin">
|
2017-01-24 22:30:23 +00:00
|
|
|
<label className="inline-block">Follow redirects automatically
|
2016-12-21 23:37:48 +00:00
|
|
|
<input type="checkbox"
|
|
|
|
checked={settings.followRedirects}
|
|
|
|
onChange={e => updateSetting('followRedirects', e.target.checked)}/>
|
2016-11-07 20:24:38 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
2016-12-21 23:37:48 +00:00
|
|
|
<div className="form-control form-control--thin">
|
2017-01-24 22:30:23 +00:00
|
|
|
<label className="inline-block">Validate SSL Certificates
|
2016-12-21 23:37:48 +00:00
|
|
|
<input type="checkbox"
|
|
|
|
checked={settings.validateSSL}
|
|
|
|
onChange={e => updateSetting('validateSSL', e.target.checked)}/>
|
2016-11-07 20:24:38 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
2016-12-21 23:37:48 +00:00
|
|
|
<div className="form-control form-control--thin">
|
2017-01-24 22:30:23 +00:00
|
|
|
<label className="inline-block">Show passwords in plain-text
|
2016-12-21 23:37:48 +00:00
|
|
|
<input type="checkbox"
|
|
|
|
checked={settings.showPasswords}
|
|
|
|
onChange={e => updateSetting('showPasswords', e.target.checked)}/>
|
2016-11-07 20:24:38 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
2016-12-21 23:37:48 +00:00
|
|
|
<div className="form-control form-control--thin">
|
2017-01-24 22:30:23 +00:00
|
|
|
<label className="inline-block">Use bulk header editor by default
|
2016-12-21 23:37:48 +00:00
|
|
|
<input type="checkbox"
|
|
|
|
checked={settings.useBulkHeaderEditor}
|
|
|
|
onChange={e => updateSetting('useBulkHeaderEditor', e.target.checked)}/>
|
2016-11-07 20:24:38 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
2016-12-21 23:37:48 +00:00
|
|
|
<div className="form-control form-control--thin">
|
2017-01-24 22:30:23 +00:00
|
|
|
<label className="inline-block">Always use vertical layout
|
2016-12-21 23:37:48 +00:00
|
|
|
<input type="checkbox"
|
|
|
|
checked={settings.forceVerticalLayout}
|
|
|
|
onChange={e => updateSetting('forceVerticalLayout', e.target.checked)}/>
|
2016-11-07 20:24:38 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
2016-12-21 23:37:48 +00:00
|
|
|
<div className="form-control form-control--thin">
|
2017-01-24 22:30:23 +00:00
|
|
|
<label className="inline-block">Wrap Long Lines
|
2016-12-21 23:37:48 +00:00
|
|
|
<input type="checkbox"
|
|
|
|
checked={settings.editorLineWrapping}
|
|
|
|
onChange={e => updateSetting('editorLineWrapping', e.target.checked)}/>
|
2016-11-07 20:24:38 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
2016-11-16 17:18:39 +00:00
|
|
|
|
2017-01-24 22:25:21 +00:00
|
|
|
<div className="form-row">
|
|
|
|
<div className="form-control form-control--outlined pad-top-sm">
|
|
|
|
<label>Text Editor Font Size (px)
|
|
|
|
<input type="number"
|
|
|
|
min={8}
|
|
|
|
max={20}
|
|
|
|
defaultValue={settings.editorFontSize}
|
|
|
|
onChange={e => updateSetting('editorFontSize', parseInt(e.target.value, 10))}/>
|
|
|
|
</label>
|
|
|
|
</div>
|
2016-11-07 20:24:38 +00:00
|
|
|
|
2017-01-24 22:25:21 +00:00
|
|
|
<div className="form-control form-control--outlined pad-top-sm">
|
|
|
|
<label>
|
|
|
|
Text Editor Key Map
|
|
|
|
<select defaultValue={settings.editorKeyMap}
|
|
|
|
onChange={e => updateSetting('editorKeyMap', e.target.value)}>
|
|
|
|
<option value="default">Default</option>
|
|
|
|
<option value="vim">Vim</option>
|
|
|
|
<option value="emacs">Emacs</option>
|
|
|
|
<option value="sublime">Sublime</option>
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
</div>
|
2017-01-24 22:18:11 +00:00
|
|
|
</div>
|
|
|
|
|
2016-11-29 20:55:31 +00:00
|
|
|
<div className="form-control form-control--outlined">
|
|
|
|
<label>Request Timeout (ms) (0 for no timeout)
|
2016-12-21 23:37:48 +00:00
|
|
|
<input type="number"
|
|
|
|
min={0}
|
2017-01-24 22:18:11 +00:00
|
|
|
defaultValue={settings.timeout}
|
2016-12-21 23:37:48 +00:00
|
|
|
onChange={e => updateSetting('timeout', parseInt(e.target.value, 10))}/>
|
2016-11-29 20:55:31 +00:00
|
|
|
</label>
|
2016-12-21 23:37:48 +00:00
|
|
|
</div>
|
|
|
|
<div className="form-row">
|
|
|
|
<div className="form-control form-control--outlined">
|
|
|
|
<label>HTTP Proxy
|
|
|
|
<input type="text"
|
|
|
|
placeholder="localhost:8005"
|
|
|
|
defaultValue={settings.httpProxy}
|
|
|
|
onChange={e => updateSetting('httpProxy', e.target.value)}/>
|
|
|
|
</label>
|
2016-11-07 20:24:38 +00:00
|
|
|
</div>
|
2016-12-21 23:37:48 +00:00
|
|
|
<div className="form-control form-control--outlined">
|
|
|
|
<label>HTTPS Proxy
|
|
|
|
<input placeholder="localhost:8005"
|
|
|
|
type="text"
|
|
|
|
defaultValue={settings.httpsProxy}
|
|
|
|
onChange={e => updateSetting('httpsProxy', e.target.value)}/>
|
|
|
|
</label>
|
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;
|