|
|
@ -32,7 +32,7 @@ class SettingsComponent extends React.Component<Props> { |
|
|
|
this.props.dispatch(settingActions.load()); |
|
|
|
this.props.dispatch(settingActions.load()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
renderFormFields(form: any) { |
|
|
|
renderFormFields(form: FormSettings) { |
|
|
|
return <div> |
|
|
|
return <div> |
|
|
|
<fieldset> |
|
|
|
<fieldset> |
|
|
|
<legend>Keybindings</legend> |
|
|
|
<legend>Keybindings</legend> |
|
|
@ -53,7 +53,7 @@ class SettingsComponent extends React.Component<Props> { |
|
|
|
<fieldset> |
|
|
|
<fieldset> |
|
|
|
<legend>Blacklist</legend> |
|
|
|
<legend>Blacklist</legend> |
|
|
|
<BlacklistForm |
|
|
|
<BlacklistForm |
|
|
|
value={form.blacklist} |
|
|
|
value={form.blacklist.toJSON()} |
|
|
|
onChange={this.bindBlacklistForm.bind(this)} |
|
|
|
onChange={this.bindBlacklistForm.bind(this)} |
|
|
|
onBlur={this.save.bind(this)} |
|
|
|
onBlur={this.save.bind(this)} |
|
|
|
/> |
|
|
|
/> |
|
|
@ -62,7 +62,7 @@ class SettingsComponent extends React.Component<Props> { |
|
|
|
<legend>Properties</legend> |
|
|
|
<legend>Properties</legend> |
|
|
|
<PropertiesForm |
|
|
|
<PropertiesForm |
|
|
|
types={Properties.types()} |
|
|
|
types={Properties.types()} |
|
|
|
value={form.properties} |
|
|
|
value={form.properties.toJSON()} |
|
|
|
onChange={this.bindPropertiesForm.bind(this)} |
|
|
|
onChange={this.bindPropertiesForm.bind(this)} |
|
|
|
onBlur={this.save.bind(this)} |
|
|
|
onBlur={this.save.bind(this)} |
|
|
|
/> |
|
|
|
/> |
|
|
@ -89,10 +89,9 @@ class SettingsComponent extends React.Component<Props> { |
|
|
|
let fields = null; |
|
|
|
let fields = null; |
|
|
|
let disabled = this.props.error.length > 0; |
|
|
|
let disabled = this.props.error.length > 0; |
|
|
|
if (this.props.source === 'form') { |
|
|
|
if (this.props.source === 'form') { |
|
|
|
fields = this.renderFormFields(this.props.form); |
|
|
|
fields = this.renderFormFields(this.props.form!!); |
|
|
|
} else if (this.props.source === 'json') { |
|
|
|
} else if (this.props.source === 'json') { |
|
|
|
fields = this.renderJsonFields( |
|
|
|
fields = this.renderJsonFields(this.props.json!!, this.props.error); |
|
|
|
this.props.json as JSONTextSettings, this.props.error); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div> |
|
|
|
<div> |
|
|
|