mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 23:00:30 +00:00
d58edf1d25
* Started on UI makeover for teams * Some small tweaks and fixes * Adjusted settings
99 lines
3.3 KiB
JavaScript
99 lines
3.3 KiB
JavaScript
import React, {PropTypes} from 'react';
|
|
|
|
const SettingsGeneral = ({settings, updateSetting}) => (
|
|
<div>
|
|
<div className="form-control form-control--thin">
|
|
<label>Follow redirects automatically
|
|
<input type="checkbox"
|
|
checked={settings.followRedirects}
|
|
onChange={e => updateSetting('followRedirects', e.target.checked)}/>
|
|
</label>
|
|
</div>
|
|
|
|
<div className="form-control form-control--thin">
|
|
<label>Validate SSL Certificates
|
|
<input type="checkbox"
|
|
checked={settings.validateSSL}
|
|
onChange={e => updateSetting('validateSSL', e.target.checked)}/>
|
|
</label>
|
|
</div>
|
|
|
|
<div className="form-control form-control--thin">
|
|
<label>Show passwords in plain-text
|
|
<input type="checkbox"
|
|
checked={settings.showPasswords}
|
|
onChange={e => updateSetting('showPasswords', e.target.checked)}/>
|
|
</label>
|
|
</div>
|
|
|
|
<div className="form-control form-control--thin">
|
|
<label>Use bulk header editor by default
|
|
<input type="checkbox"
|
|
checked={settings.useBulkHeaderEditor}
|
|
onChange={e => updateSetting('useBulkHeaderEditor', e.target.checked)}/>
|
|
</label>
|
|
</div>
|
|
|
|
<div className="form-control form-control--thin">
|
|
<label>Always use vertical layout
|
|
<input type="checkbox"
|
|
checked={settings.forceVerticalLayout}
|
|
onChange={e => updateSetting('forceVerticalLayout', e.target.checked)}/>
|
|
</label>
|
|
</div>
|
|
|
|
<div className="form-control form-control--thin">
|
|
<label>Wrap Long Lines
|
|
<input type="checkbox"
|
|
checked={settings.editorLineWrapping}
|
|
onChange={e => updateSetting('editorLineWrapping', e.target.checked)}/>
|
|
</label>
|
|
</div>
|
|
|
|
<div className="form-control form-control--outlined pad-top-sm">
|
|
<label>Request/Response Font Size (px)
|
|
<input type="number"
|
|
min={8}
|
|
max={20}
|
|
value={settings.editorFontSize}
|
|
onChange={e => updateSetting('editorFontSize', parseInt(e.target.value, 10))}/>
|
|
</label>
|
|
</div>
|
|
|
|
<div className="form-control form-control--outlined">
|
|
<label>Request Timeout (ms) (0 for no timeout)
|
|
<input type="number"
|
|
min={0}
|
|
value={settings.timeout}
|
|
onChange={e => updateSetting('timeout', parseInt(e.target.value, 10))}/>
|
|
</label>
|
|
</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>
|
|
</div>
|
|
<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>
|
|
</div>
|
|
</div>
|
|
<br/>
|
|
</div>
|
|
);
|
|
|
|
SettingsGeneral.propTypes = {
|
|
settings: PropTypes.object.isRequired,
|
|
updateSetting: PropTypes.func.isRequired
|
|
};
|
|
|
|
export default SettingsGeneral;
|