2017-11-21 17:49:33 +00:00
|
|
|
// @flow
|
|
|
|
import * as React from 'react';
|
2018-10-17 17:26:19 +00:00
|
|
|
import * as fontManager from 'font-manager';
|
2017-03-03 01:44:07 +00:00
|
|
|
import autobind from 'autobind-decorator';
|
2017-03-28 22:45:23 +00:00
|
|
|
import HelpTooltip from '../help-tooltip';
|
2018-06-25 17:42:50 +00:00
|
|
|
import {
|
2018-11-07 20:14:49 +00:00
|
|
|
isLinux,
|
2018-06-25 17:42:50 +00:00
|
|
|
isMac,
|
|
|
|
isWindows,
|
|
|
|
UPDATE_CHANNEL_BETA,
|
2018-12-12 17:36:11 +00:00
|
|
|
UPDATE_CHANNEL_STABLE,
|
2018-06-25 17:42:50 +00:00
|
|
|
} from '../../../common/constants';
|
|
|
|
import type { Settings } from '../../../models/settings';
|
2017-11-21 17:49:33 +00:00
|
|
|
import CheckForUpdatesButton from '../check-for-updates-button';
|
2018-10-17 18:20:46 +00:00
|
|
|
import { setFont } from '../../../plugins/misc';
|
2017-11-21 17:49:33 +00:00
|
|
|
|
|
|
|
type Props = {
|
|
|
|
settings: Settings,
|
|
|
|
updateSetting: Function,
|
2018-10-17 17:26:19 +00:00
|
|
|
handleToggleMenuBar: Function,
|
2018-12-12 17:36:11 +00:00
|
|
|
handleRootCssChange: Function,
|
2018-10-17 17:26:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
type State = {
|
2018-12-12 17:36:11 +00:00
|
|
|
fonts: [],
|
2017-11-21 17:49:33 +00:00
|
|
|
};
|
2016-11-07 20:24:38 +00:00
|
|
|
|
2017-03-03 01:44:07 +00:00
|
|
|
@autobind
|
2018-10-17 17:26:19 +00:00
|
|
|
class General extends React.PureComponent<Props, State> {
|
|
|
|
constructor(props: Props) {
|
|
|
|
super(props);
|
|
|
|
this.state = {
|
2018-12-12 17:36:11 +00:00
|
|
|
fonts: [],
|
2018-10-17 17:26:19 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
componentDidMount() {
|
2018-10-17 18:20:46 +00:00
|
|
|
fontManager.getAvailableFonts(allFonts => {
|
|
|
|
const fonts = allFonts
|
|
|
|
.filter(i => i.style.toLowerCase() === 'regular' && !i.italic)
|
2018-10-17 20:15:25 +00:00
|
|
|
.sort((a, b) => (a.family > b.family ? 1 : -1));
|
2018-10-17 18:20:46 +00:00
|
|
|
|
|
|
|
this.setState({ fonts });
|
|
|
|
});
|
2018-10-17 17:26:19 +00:00
|
|
|
}
|
|
|
|
|
2018-10-17 18:20:46 +00:00
|
|
|
async _handleUpdateSetting(e: SyntheticEvent<HTMLInputElement>): Promise<Settings> {
|
2017-11-21 17:49:33 +00:00
|
|
|
const el = e.currentTarget;
|
|
|
|
let value = el.type === 'checkbox' ? el.checked : el.value;
|
2016-11-07 20:24:38 +00:00
|
|
|
|
2018-03-29 17:59:32 +00:00
|
|
|
if (e.currentTarget.type === 'number') {
|
2017-02-13 08:12:02 +00:00
|
|
|
value = parseInt(value, 10);
|
|
|
|
}
|
2016-11-07 20:24:38 +00:00
|
|
|
|
2018-10-17 18:20:46 +00:00
|
|
|
if (e.currentTarget.value === '__NULL__') {
|
|
|
|
value = null;
|
|
|
|
}
|
2017-05-17 16:35:44 +00:00
|
|
|
|
2018-10-17 18:20:46 +00:00
|
|
|
return this.props.updateSetting(el.name, value);
|
2018-10-17 17:26:19 +00:00
|
|
|
}
|
|
|
|
|
2018-10-17 18:20:46 +00:00
|
|
|
async _handleToggleMenuBar(e: SyntheticEvent<HTMLInputElement>) {
|
|
|
|
const settings = await this._handleUpdateSetting(e);
|
|
|
|
this.props.handleToggleMenuBar(settings.autoHideMenuBar);
|
2018-10-17 17:26:19 +00:00
|
|
|
}
|
|
|
|
|
2018-10-17 18:20:46 +00:00
|
|
|
async _handleFontLigatureChange(el: SyntheticEvent<HTMLInputElement>) {
|
|
|
|
const settings = await this._handleUpdateSetting(el);
|
|
|
|
setFont(settings);
|
2018-10-17 17:26:19 +00:00
|
|
|
}
|
|
|
|
|
2018-10-17 18:20:46 +00:00
|
|
|
async _handleFontSizeChange(el: SyntheticEvent<HTMLInputElement>) {
|
|
|
|
const settings = await this._handleUpdateSetting(el);
|
|
|
|
setFont(settings);
|
2018-10-17 17:26:19 +00:00
|
|
|
}
|
|
|
|
|
2018-10-17 18:20:46 +00:00
|
|
|
async _handleFontChange(el: SyntheticEvent<HTMLInputElement>) {
|
|
|
|
const settings = await this._handleUpdateSetting(el);
|
|
|
|
setFont(settings);
|
2018-10-17 17:26:19 +00:00
|
|
|
}
|
|
|
|
|
2018-06-25 17:42:50 +00:00
|
|
|
render() {
|
|
|
|
const { settings } = this.props;
|
2018-10-17 17:26:19 +00:00
|
|
|
const { fonts } = this.state;
|
2017-02-13 08:12:02 +00:00
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<div className="form-control form-control--thin">
|
2018-06-25 17:42:50 +00:00
|
|
|
<label className="inline-block">
|
|
|
|
Follow redirects automatically
|
|
|
|
<input
|
|
|
|
type="checkbox"
|
|
|
|
name="followRedirects"
|
|
|
|
checked={settings.followRedirects}
|
|
|
|
onChange={this._handleUpdateSetting}
|
|
|
|
/>
|
2017-02-13 08:12:02 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
2016-11-07 20:24:38 +00:00
|
|
|
|
2017-02-13 08:12:02 +00:00
|
|
|
<div className="form-control form-control--thin">
|
2018-06-25 17:42:50 +00:00
|
|
|
<label className="inline-block">
|
|
|
|
Validate SSL Certificates
|
|
|
|
<input
|
|
|
|
type="checkbox"
|
|
|
|
name="validateSSL"
|
|
|
|
checked={settings.validateSSL}
|
|
|
|
onChange={this._handleUpdateSetting}
|
|
|
|
/>
|
2017-02-13 08:12:02 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
2016-11-07 20:24:38 +00:00
|
|
|
|
2017-02-13 08:12:02 +00:00
|
|
|
<div className="form-control form-control--thin">
|
2018-06-25 17:42:50 +00:00
|
|
|
<label className="inline-block">
|
|
|
|
Show passwords in plain-text
|
|
|
|
<input
|
|
|
|
type="checkbox"
|
|
|
|
name="showPasswords"
|
|
|
|
checked={settings.showPasswords}
|
|
|
|
onChange={this._handleUpdateSetting}
|
|
|
|
/>
|
2017-02-13 08:12:02 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
2016-11-16 17:18:39 +00:00
|
|
|
|
2017-02-13 08:12:02 +00:00
|
|
|
<div className="form-control form-control--thin">
|
2018-06-25 17:42:50 +00:00
|
|
|
<label className="inline-block">
|
|
|
|
Use bulk header editor by default
|
|
|
|
<input
|
|
|
|
type="checkbox"
|
|
|
|
name="useBulkHeaderEditor"
|
|
|
|
checked={settings.useBulkHeaderEditor}
|
|
|
|
onChange={this._handleUpdateSetting}
|
|
|
|
/>
|
2017-02-13 08:12:02 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
2016-11-07 20:24:38 +00:00
|
|
|
|
2017-02-13 08:12:02 +00:00
|
|
|
<div className="form-control form-control--thin">
|
2018-06-25 17:42:50 +00:00
|
|
|
<label className="inline-block">
|
|
|
|
Always use vertical layout
|
|
|
|
<input
|
|
|
|
type="checkbox"
|
|
|
|
name="forceVerticalLayout"
|
|
|
|
checked={settings.forceVerticalLayout}
|
|
|
|
onChange={this._handleUpdateSetting}
|
|
|
|
/>
|
2017-02-13 08:12:02 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
2017-01-24 22:18:11 +00:00
|
|
|
|
2017-06-07 00:07:09 +00:00
|
|
|
{!isMac() && (
|
2017-05-17 16:35:44 +00:00
|
|
|
<div className="form-control form-control--thin">
|
2018-06-25 17:42:50 +00:00
|
|
|
<label className="inline-block">
|
|
|
|
Hide Menu Bar
|
|
|
|
<input
|
|
|
|
type="checkbox"
|
|
|
|
name="autoHideMenuBar"
|
|
|
|
checked={settings.autoHideMenuBar}
|
|
|
|
onChange={this._handleToggleMenuBar}
|
|
|
|
/>
|
2017-05-17 16:35:44 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
2017-06-07 00:07:09 +00:00
|
|
|
)}
|
2017-05-17 16:35:44 +00:00
|
|
|
|
2017-02-13 08:12:02 +00:00
|
|
|
<div className="form-control form-control--thin">
|
2018-06-25 17:42:50 +00:00
|
|
|
<label className="inline-block">
|
|
|
|
Wrap Long Lines
|
|
|
|
<input
|
|
|
|
type="checkbox"
|
|
|
|
name="editorLineWrapping"
|
|
|
|
checked={settings.editorLineWrapping}
|
|
|
|
onChange={this._handleUpdateSetting}
|
|
|
|
/>
|
2017-02-13 08:12:02 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
2017-06-01 13:35:29 +00:00
|
|
|
<div className="form-control form-control--thin">
|
2017-10-13 08:22:13 +00:00
|
|
|
<label className="inline-block">
|
2018-06-25 17:42:50 +00:00
|
|
|
Nunjucks Power User Mode{' '}
|
2017-10-13 08:22:13 +00:00
|
|
|
<HelpTooltip>
|
2018-10-17 16:42:33 +00:00
|
|
|
Disable tag editing interface in favor of raw Nunjucks syntax (requires restart)
|
2017-10-13 08:22:13 +00:00
|
|
|
</HelpTooltip>
|
2018-06-25 17:42:50 +00:00
|
|
|
<input
|
|
|
|
type="checkbox"
|
|
|
|
name="nunjucksPowerUserMode"
|
|
|
|
checked={settings.nunjucksPowerUserMode}
|
|
|
|
onChange={this._handleUpdateSetting}
|
|
|
|
/>
|
2017-10-13 08:22:13 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
2018-09-26 23:08:32 +00:00
|
|
|
<div className="form-control form-control--thin">
|
|
|
|
<label className="inline-block">
|
|
|
|
Indent With Tabs
|
|
|
|
<input
|
|
|
|
type="checkbox"
|
|
|
|
name="editorIndentWithTabs"
|
|
|
|
checked={settings.editorIndentWithTabs}
|
|
|
|
onChange={this._handleUpdateSetting}
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
2018-10-17 18:20:46 +00:00
|
|
|
<div className="form-control form-control--thin">
|
|
|
|
<label className="inline-block">
|
|
|
|
Font Ligatures
|
|
|
|
<input
|
|
|
|
type="checkbox"
|
|
|
|
name="fontVariantLigatures"
|
|
|
|
checked={settings.fontVariantLigatures}
|
|
|
|
onChange={this._handleFontLigatureChange}
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
2019-01-09 23:13:24 +00:00
|
|
|
<div className="form-row">
|
|
|
|
<div className="form-control form-control--outlined pad-top-sm">
|
|
|
|
<label>
|
|
|
|
Environment Highlight Color Style{' '}
|
|
|
|
<HelpTooltip>Configures the appearance of environment's color indicator</HelpTooltip>
|
|
|
|
<select
|
|
|
|
defaultValue={settings.environmentHighlightColorStyle}
|
|
|
|
name="environmentHighlightColorStyle"
|
|
|
|
onChange={this._handleUpdateSetting}>
|
|
|
|
<option value="sidebar-indicator">Sidebar indicator</option>
|
|
|
|
<option value="sidebar-edge">Sidebar edge</option>
|
|
|
|
<option value="window-top">Window top</option>
|
|
|
|
<option value="window-bottom">Window bottom</option>
|
|
|
|
<option value="window-left">Window left</option>
|
|
|
|
<option value="window-right">Window right</option>
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div className="form-control form-control--outlined pad-top-sm">
|
|
|
|
<label>
|
|
|
|
Autocomplete popup delay
|
|
|
|
<HelpTooltip className="space-left">
|
|
|
|
Configure the autocomplete popup delay in milliseconds (0 to disable)
|
|
|
|
</HelpTooltip>
|
|
|
|
<input
|
|
|
|
type="number"
|
|
|
|
name="autocompleteDelay"
|
|
|
|
min={0}
|
|
|
|
max={3000}
|
|
|
|
defaultValue={settings.autocompleteDelay}
|
|
|
|
onChange={this._handleUpdateSetting}
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</div>
|
2018-07-12 20:38:51 +00:00
|
|
|
</div>
|
|
|
|
|
2018-10-17 17:26:19 +00:00
|
|
|
<div className="form-row">
|
2018-10-17 18:20:46 +00:00
|
|
|
<div className="form-control form-control--outlined">
|
2018-10-17 17:26:19 +00:00
|
|
|
<label>
|
2018-10-17 18:20:46 +00:00
|
|
|
Interface Font
|
2018-10-17 17:26:19 +00:00
|
|
|
<select
|
2018-10-17 18:20:46 +00:00
|
|
|
name="fontInterface"
|
|
|
|
value={settings.fontInterface || '__NULL__'}
|
2018-10-17 17:26:19 +00:00
|
|
|
onChange={this._handleFontChange}>
|
2018-10-17 18:20:46 +00:00
|
|
|
<option value="__NULL__">-- System Default --</option>
|
|
|
|
{fonts.map((item, index) => (
|
|
|
|
<option key={index} value={item.family}>
|
|
|
|
{item.family}
|
|
|
|
</option>
|
|
|
|
))}
|
2018-10-17 17:26:19 +00:00
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
</div>
|
2018-10-17 18:20:46 +00:00
|
|
|
<div className="form-control form-control--outlined">
|
|
|
|
<label>
|
|
|
|
Interface Font Size (px)
|
|
|
|
<input
|
|
|
|
type="number"
|
|
|
|
name="fontSize"
|
|
|
|
min={8}
|
|
|
|
max={20}
|
|
|
|
defaultValue={settings.fontSize}
|
|
|
|
onChange={this._handleFontSizeChange}
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-10-17 17:26:19 +00:00
|
|
|
|
2018-10-17 18:20:46 +00:00
|
|
|
<div className="form-row">
|
|
|
|
<div className="form-control form-control--outlined">
|
2018-10-17 17:26:19 +00:00
|
|
|
<label>
|
2018-10-17 18:20:46 +00:00
|
|
|
Text Editor Font
|
2018-10-17 17:26:19 +00:00
|
|
|
<select
|
|
|
|
name="fontMonospace"
|
2018-10-17 18:20:46 +00:00
|
|
|
value={settings.fontMonospace || '__NULL__'}
|
2018-10-17 17:26:19 +00:00
|
|
|
onChange={this._handleFontChange}>
|
2018-10-17 18:20:46 +00:00
|
|
|
<option value="__NULL__">-- System Default --</option>
|
|
|
|
{fonts.filter(i => i.monospace).map((item, index) => (
|
|
|
|
<option key={index} value={item.family}>
|
|
|
|
{item.family}
|
|
|
|
</option>
|
|
|
|
))}
|
2018-10-17 17:26:19 +00:00
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
</div>
|
2018-10-17 18:20:46 +00:00
|
|
|
<div className="form-control form-control--outlined">
|
2018-06-25 17:42:50 +00:00
|
|
|
<label>
|
|
|
|
Text Editor Font Size (px)
|
|
|
|
<input
|
|
|
|
type="number"
|
|
|
|
name="editorFontSize"
|
|
|
|
min={8}
|
|
|
|
max={20}
|
|
|
|
defaultValue={settings.editorFontSize}
|
|
|
|
onChange={this._handleUpdateSetting}
|
|
|
|
/>
|
2017-02-13 08:12:02 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
2018-10-17 18:20:46 +00:00
|
|
|
</div>
|
2017-02-13 08:12:02 +00:00
|
|
|
|
2018-10-17 18:20:46 +00:00
|
|
|
<div className="form-row">
|
|
|
|
<div className="form-control form-control--outlined">
|
2018-06-25 17:42:50 +00:00
|
|
|
<label>
|
|
|
|
Text Editor Indent Size
|
|
|
|
<input
|
|
|
|
type="number"
|
|
|
|
name="editorIndentSize"
|
|
|
|
min={1}
|
|
|
|
max={16}
|
|
|
|
defaultValue={settings.editorIndentSize}
|
|
|
|
onChange={this._handleUpdateSetting}
|
|
|
|
/>
|
2017-04-14 21:47:15 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
2018-10-17 18:20:46 +00:00
|
|
|
<div className="form-control form-control--outlined">
|
2018-06-25 17:42:50 +00:00
|
|
|
<label>
|
|
|
|
Text Editor Key Map
|
|
|
|
<select
|
|
|
|
defaultValue={settings.editorKeyMap}
|
|
|
|
name="editorKeyMap"
|
|
|
|
onChange={this._handleUpdateSetting}>
|
2017-02-13 08:12:02 +00:00
|
|
|
<option value="default">Default</option>
|
|
|
|
<option value="vim">Vim</option>
|
|
|
|
<option value="emacs">Emacs</option>
|
2017-06-22 17:17:59 +00:00
|
|
|
<option value="sublime">Sublime</option>
|
2017-02-13 08:12:02 +00:00
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2018-10-17 20:15:25 +00:00
|
|
|
<hr className="pad-top" />
|
2017-08-16 17:08:29 +00:00
|
|
|
|
2018-10-17 18:20:46 +00:00
|
|
|
<h2>
|
|
|
|
HTTP Network Proxy
|
|
|
|
<HelpTooltip
|
|
|
|
className="space-left txt-md"
|
|
|
|
style={{ maxWidth: '20rem', lineWrap: 'word' }}>
|
|
|
|
Enable global network proxy. Supports authentication via Basic Auth, digest, or NTLM
|
|
|
|
</HelpTooltip>
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
<div className="form-row">
|
|
|
|
<div className="form-control form-control--outlined">
|
|
|
|
<label>
|
|
|
|
Maximum Redirects
|
|
|
|
<HelpTooltip className="space-left">(-1 for unlimited)</HelpTooltip>
|
|
|
|
<input
|
|
|
|
type="number"
|
|
|
|
name="maxRedirects"
|
|
|
|
min={-1}
|
|
|
|
defaultValue={settings.maxRedirects}
|
|
|
|
onChange={this._handleUpdateSetting}
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className="form-control form-control--outlined">
|
|
|
|
<label>
|
|
|
|
Network Request Timeout
|
|
|
|
<HelpTooltip className="space-left">
|
|
|
|
Request timeout in milliseconds (0 for no timeout)
|
|
|
|
</HelpTooltip>
|
|
|
|
<input
|
|
|
|
type="number"
|
|
|
|
name="timeout"
|
|
|
|
min={-1}
|
|
|
|
defaultValue={settings.timeout}
|
|
|
|
onChange={this._handleUpdateSetting}
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</div>
|
2017-02-13 08:12:02 +00:00
|
|
|
</div>
|
2018-10-17 18:20:46 +00:00
|
|
|
|
2018-10-17 20:15:25 +00:00
|
|
|
<hr className="pad-top" />
|
2017-03-29 02:21:49 +00:00
|
|
|
|
|
|
|
<h2>
|
|
|
|
HTTP Network Proxy
|
2018-06-25 17:42:50 +00:00
|
|
|
<HelpTooltip
|
|
|
|
className="space-left txt-md"
|
|
|
|
style={{ maxWidth: '20rem', lineWrap: 'word' }}>
|
2018-10-17 16:42:33 +00:00
|
|
|
Enable global network proxy. Supports authentication via Basic Auth, digest, or NTLM
|
2017-03-29 02:21:49 +00:00
|
|
|
</HelpTooltip>
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
<div className="form-control form-control--thin">
|
2018-06-25 17:42:50 +00:00
|
|
|
<label className="inline-block">
|
|
|
|
Enable Proxy
|
|
|
|
<input
|
|
|
|
type="checkbox"
|
|
|
|
name="proxyEnabled"
|
|
|
|
checked={settings.proxyEnabled}
|
|
|
|
onChange={this._handleUpdateSetting}
|
|
|
|
/>
|
2017-03-29 02:21:49 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className="form-row pad-top-sm">
|
2017-02-13 08:12:02 +00:00
|
|
|
<div className="form-control form-control--outlined">
|
2018-06-25 17:42:50 +00:00
|
|
|
<label>
|
|
|
|
HTTP Proxy
|
|
|
|
<input
|
|
|
|
type="text"
|
|
|
|
name="httpProxy"
|
|
|
|
disabled={!settings.proxyEnabled}
|
|
|
|
placeholder="localhost:8005"
|
|
|
|
defaultValue={settings.httpProxy}
|
|
|
|
onChange={this._handleUpdateSetting}
|
|
|
|
/>
|
2017-02-13 08:12:02 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div className="form-control form-control--outlined">
|
2018-06-25 17:42:50 +00:00
|
|
|
<label>
|
|
|
|
HTTPS Proxy
|
|
|
|
<input
|
|
|
|
placeholder="localhost:8005"
|
|
|
|
disabled={!settings.proxyEnabled}
|
|
|
|
name="httpsProxy"
|
|
|
|
type="text"
|
|
|
|
defaultValue={settings.httpsProxy}
|
|
|
|
onChange={this._handleUpdateSetting}
|
|
|
|
/>
|
2017-02-13 08:12:02 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
2017-06-06 20:21:59 +00:00
|
|
|
<div className="form-control form-control--outlined">
|
2017-06-07 00:07:09 +00:00
|
|
|
<label>
|
2018-06-25 17:42:50 +00:00
|
|
|
No Proxy{' '}
|
|
|
|
<HelpTooltip>
|
2018-10-17 16:42:33 +00:00
|
|
|
Comma-separated list of hostnames that do not require a proxy to be contacted
|
2018-06-25 17:42:50 +00:00
|
|
|
</HelpTooltip>
|
|
|
|
<input
|
|
|
|
placeholder="localhost,127.0.0.1"
|
|
|
|
disabled={!settings.proxyEnabled}
|
|
|
|
name="noProxy"
|
|
|
|
type="text"
|
|
|
|
defaultValue={settings.noProxy}
|
|
|
|
onChange={this._handleUpdateSetting}
|
|
|
|
/>
|
2017-06-06 20:21:59 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
2017-02-13 08:12:02 +00:00
|
|
|
</div>
|
2017-07-20 01:55:40 +00:00
|
|
|
|
2018-11-07 20:14:49 +00:00
|
|
|
{(isWindows() || isMac()) && (
|
|
|
|
<React.Fragment>
|
2018-10-17 20:15:25 +00:00
|
|
|
<hr className="pad-top" />
|
2017-11-21 17:49:33 +00:00
|
|
|
<div>
|
|
|
|
<div className="pull-right">
|
|
|
|
<CheckForUpdatesButton className="btn btn--outlined btn--super-duper-compact">
|
|
|
|
Check Now
|
|
|
|
</CheckForUpdatesButton>
|
|
|
|
</div>
|
|
|
|
<h2>Software Updates</h2>
|
|
|
|
</div>
|
|
|
|
<div className="form-control form-control--thin">
|
2018-06-25 17:42:50 +00:00
|
|
|
<label className="inline-block">
|
|
|
|
Automatically download and install updates
|
2017-11-21 17:49:33 +00:00
|
|
|
<HelpTooltip className="space-left">
|
2018-10-17 16:42:33 +00:00
|
|
|
If disabled, you will receive a notification when a new update is available
|
2017-11-21 17:49:33 +00:00
|
|
|
</HelpTooltip>
|
2018-06-25 17:42:50 +00:00
|
|
|
<input
|
|
|
|
type="checkbox"
|
|
|
|
name="updateAutomatically"
|
|
|
|
checked={settings.updateAutomatically}
|
|
|
|
onChange={this._handleUpdateSetting}
|
|
|
|
/>
|
2017-11-21 17:49:33 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div className="form-control form-control--outlined pad-top-sm">
|
2018-06-25 17:42:50 +00:00
|
|
|
<label>
|
|
|
|
Update Channel
|
|
|
|
<select
|
|
|
|
value={settings.updateChannel}
|
|
|
|
name="updateChannel"
|
|
|
|
onChange={this._handleUpdateSetting}>
|
2018-10-17 16:42:33 +00:00
|
|
|
<option value={UPDATE_CHANNEL_STABLE}>Release (Recommended)</option>
|
|
|
|
<option value={UPDATE_CHANNEL_BETA}>Early Access (Beta)</option>
|
2017-11-21 17:49:33 +00:00
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
</div>
|
2018-11-07 20:14:49 +00:00
|
|
|
</React.Fragment>
|
|
|
|
)}
|
|
|
|
|
|
|
|
{isLinux() && (
|
|
|
|
<React.Fragment>
|
|
|
|
<hr className="pad-top" />
|
|
|
|
<h2>Software Updates</h2>
|
|
|
|
<div className="form-control form-control--thin">
|
|
|
|
<label className="inline-block">
|
|
|
|
Do not notify of new releases
|
|
|
|
<input
|
|
|
|
type="checkbox"
|
|
|
|
name="disableUpdateNotification"
|
|
|
|
checked={settings.disableUpdateNotification}
|
|
|
|
onChange={this._handleUpdateSetting}
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</React.Fragment>
|
|
|
|
)}
|
2017-07-20 01:55:40 +00:00
|
|
|
|
2018-10-17 20:15:25 +00:00
|
|
|
<hr className="pad-top" />
|
2017-07-20 01:55:40 +00:00
|
|
|
<h2>Plugins</h2>
|
|
|
|
|
|
|
|
<div className="form-control form-control--outlined">
|
|
|
|
<label>
|
2018-06-25 17:42:50 +00:00
|
|
|
Additional Plugin Path{' '}
|
2018-10-17 16:42:33 +00:00
|
|
|
<HelpTooltip>Tell Insomnia to look for plugins in a different directory</HelpTooltip>
|
2018-06-25 17:42:50 +00:00
|
|
|
<input
|
|
|
|
placeholder="~/.insomnia:/other/path"
|
|
|
|
name="pluginPath"
|
|
|
|
type="text"
|
|
|
|
defaultValue={settings.pluginPath}
|
|
|
|
onChange={this._handleUpdateSetting}
|
|
|
|
/>
|
2017-07-20 01:55:40 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
2018-10-17 20:15:25 +00:00
|
|
|
<br />
|
2016-11-07 20:24:38 +00:00
|
|
|
</div>
|
2017-03-03 20:09:08 +00:00
|
|
|
);
|
2017-02-13 08:12:02 +00:00
|
|
|
}
|
|
|
|
}
|
2016-11-07 20:24:38 +00:00
|
|
|
|
2017-03-08 05:52:17 +00:00
|
|
|
export default General;
|