Add Home timeline filters to Preferences
This commit is contained in:
parent
9e198902a9
commit
782da14272
1 changed files with 20 additions and 0 deletions
|
@ -15,6 +15,7 @@ import {
|
||||||
SelectDropdown,
|
SelectDropdown,
|
||||||
} from 'soapbox/features/forms';
|
} from 'soapbox/features/forms';
|
||||||
import SettingsCheckbox from 'soapbox/components/settings_checkbox';
|
import SettingsCheckbox from 'soapbox/components/settings_checkbox';
|
||||||
|
import SettingToggle from 'soapbox/features/notifications/components/setting_toggle';
|
||||||
|
|
||||||
export const languages = {
|
export const languages = {
|
||||||
en: 'English',
|
en: 'English',
|
||||||
|
@ -121,6 +122,11 @@ class Preferences extends ImmutablePureComponent {
|
||||||
dispatch(changeSetting(['defaultContentType'], e.target.value));
|
dispatch(changeSetting(['defaultContentType'], e.target.value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onToggleChange = (key, checked) => {
|
||||||
|
const { dispatch } = this.props;
|
||||||
|
dispatch(changeSetting(key, checked));
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { settings, features, intl } = this.props;
|
const { settings, features, intl } = this.props;
|
||||||
|
|
||||||
|
@ -133,6 +139,20 @@ class Preferences extends ImmutablePureComponent {
|
||||||
return (
|
return (
|
||||||
<Column icon='cog' heading={intl.formatMessage(messages.heading)}>
|
<Column icon='cog' heading={intl.formatMessage(messages.heading)}>
|
||||||
<SimpleForm>
|
<SimpleForm>
|
||||||
|
<FormattedMessage id='home.column_settings.title' defaultMessage='Home settings' />
|
||||||
|
<div className='column-settings__content'>
|
||||||
|
<div className='column-settings__row'>
|
||||||
|
<SettingToggle prefix='home_timeline' settings={settings} settingPath={['home', 'shows', 'reblog']} onChange={this.onToggleChange} label={<FormattedMessage id='home.column_settings.show_reblogs' defaultMessage='Show reposts' />} />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className='column-settings__row'>
|
||||||
|
<SettingToggle prefix='home_timeline' settings={settings} settingPath={['home', 'shows', 'reply']} onChange={this.onToggleChange} label={<FormattedMessage id='home.column_settings.show_replies' defaultMessage='Show replies' />} />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className='column-settings__row'>
|
||||||
|
<SettingToggle prefix='home_timeline' settings={settings} settingPath={['home', 'shows', 'direct']} onChange={this.onToggleChange} label={<FormattedMessage id='home.column_settings.show_direct' defaultMessage='Show direct messages' />} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<FieldsGroup>
|
<FieldsGroup>
|
||||||
<SelectDropdown
|
<SelectDropdown
|
||||||
label={<FormattedMessage id='preferences.fields.language_label' defaultMessage='Language' />}
|
label={<FormattedMessage id='preferences.fields.language_label' defaultMessage='Language' />}
|
||||||
|
|
Loading…
Reference in a new issue