|
|
@ -25,6 +25,7 @@ class SettingsComponent extends React.Component { |
|
|
|
<KeymapsForm |
|
|
|
<KeymapsForm |
|
|
|
value={form.keymaps} |
|
|
|
value={form.keymaps} |
|
|
|
onChange={value => this.bindForm('keymaps', value)} |
|
|
|
onChange={value => this.bindForm('keymaps', value)} |
|
|
|
|
|
|
|
onBlur={this.save.bind(this)} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</fieldset> |
|
|
|
</fieldset> |
|
|
|
<fieldset> |
|
|
|
<fieldset> |
|
|
@ -32,6 +33,7 @@ class SettingsComponent extends React.Component { |
|
|
|
<SearchForm |
|
|
|
<SearchForm |
|
|
|
value={form.search} |
|
|
|
value={form.search} |
|
|
|
onChange={value => this.bindForm('search', value)} |
|
|
|
onChange={value => this.bindForm('search', value)} |
|
|
|
|
|
|
|
onBlur={this.save.bind(this)} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</fieldset> |
|
|
|
</fieldset> |
|
|
|
<fieldset> |
|
|
|
<fieldset> |
|
|
@ -39,6 +41,7 @@ class SettingsComponent extends React.Component { |
|
|
|
<BlacklistForm |
|
|
|
<BlacklistForm |
|
|
|
value={form.blacklist} |
|
|
|
value={form.blacklist} |
|
|
|
onChange={value => this.bindForm('blacklist', value)} |
|
|
|
onChange={value => this.bindForm('blacklist', value)} |
|
|
|
|
|
|
|
onBlur={this.save.bind(this)} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</fieldset> |
|
|
|
</fieldset> |
|
|
|
<fieldset> |
|
|
|
<fieldset> |
|
|
@ -47,6 +50,7 @@ class SettingsComponent extends React.Component { |
|
|
|
types={properties.types} |
|
|
|
types={properties.types} |
|
|
|
value={form.properties} |
|
|
|
value={form.properties} |
|
|
|
onChange={value => this.bindForm('properties', value)} |
|
|
|
onChange={value => this.bindForm('properties', value)} |
|
|
|
|
|
|
|
onBlur={this.save.bind(this)} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</fieldset> |
|
|
|
</fieldset> |
|
|
|
</div>; |
|
|
|
</div>; |
|
|
@ -61,6 +65,7 @@ class SettingsComponent extends React.Component { |
|
|
|
spellCheck='false' |
|
|
|
spellCheck='false' |
|
|
|
error={error} |
|
|
|
error={error} |
|
|
|
onChange={this.bindJson.bind(this)} |
|
|
|
onChange={this.bindJson.bind(this)} |
|
|
|
|
|
|
|
onBlur={this.save.bind(this)} |
|
|
|
value={json} |
|
|
|
value={json} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</div>; |
|
|
|
</div>; |
|
|
@ -109,7 +114,7 @@ class SettingsComponent extends React.Component { |
|
|
|
form: { ...this.props.form }, |
|
|
|
form: { ...this.props.form }, |
|
|
|
}; |
|
|
|
}; |
|
|
|
settings.form[name] = value; |
|
|
|
settings.form[name] = value; |
|
|
|
this.props.dispatch(settingActions.save(settings)); |
|
|
|
this.props.dispatch(settingActions.set(settings)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bindJson(e) { |
|
|
|
bindJson(e) { |
|
|
@ -118,7 +123,7 @@ class SettingsComponent extends React.Component { |
|
|
|
json: e.target.value, |
|
|
|
json: e.target.value, |
|
|
|
form: this.props.form, |
|
|
|
form: this.props.form, |
|
|
|
}; |
|
|
|
}; |
|
|
|
this.props.dispatch(settingActions.save(settings)); |
|
|
|
this.props.dispatch(settingActions.set(settings)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bindSource(e) { |
|
|
|
bindSource(e) { |
|
|
@ -135,7 +140,9 @@ class SettingsComponent extends React.Component { |
|
|
|
} |
|
|
|
} |
|
|
|
this.props.dispatch(settingActions.switchToForm(this.props.json)); |
|
|
|
this.props.dispatch(settingActions.switchToForm(this.props.json)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
save() { |
|
|
|
let settings = this.props.store.getState(); |
|
|
|
let settings = this.props.store.getState(); |
|
|
|
this.props.dispatch(settingActions.save(settings)); |
|
|
|
this.props.dispatch(settingActions.save(settings)); |
|
|
|
} |
|
|
|
} |
|
|
|