glitchier-soc/app/javascript/mastodon/features/home_timeline/components/column_settings.jsx

39 lines
1.3 KiB
React
Raw Normal View History

import PropTypes from 'prop-types';
import { PureComponent } from 'react';
import { injectIntl, FormattedMessage } from 'react-intl';
import ImmutablePropTypes from 'react-immutable-proptypes';
2017-01-10 18:25:10 +02:00
import SettingToggle from '../../notifications/components/setting_toggle';
2023-05-23 11:52:27 +03:00
class ColumnSettings extends PureComponent {
2017-01-10 18:25:10 +02:00
static propTypes = {
settings: ImmutablePropTypes.map.isRequired,
onChange: PropTypes.func.isRequired,
intl: PropTypes.object.isRequired,
};
2017-01-10 18:25:10 +02:00
render () {
const { settings, onChange } = this.props;
2017-01-10 18:25:10 +02:00
return (
<div>
<span className='column-settings__section'><FormattedMessage id='home.column_settings.basic' defaultMessage='Basic' /></span>
2017-01-10 18:25:10 +02:00
<div className='column-settings__row'>
2017-12-25 17:14:06 +02:00
<SettingToggle prefix='home_timeline' settings={settings} settingPath={['shows', 'reblog']} onChange={onChange} label={<FormattedMessage id='home.column_settings.show_reblogs' defaultMessage='Show boosts' />} />
</div>
2017-01-10 18:25:10 +02:00
<div className='column-settings__row'>
2017-12-25 17:14:06 +02:00
<SettingToggle prefix='home_timeline' settings={settings} settingPath={['shows', 'reply']} onChange={onChange} label={<FormattedMessage id='home.column_settings.show_replies' defaultMessage='Show replies' />} />
</div>
</div>
2017-01-10 18:25:10 +02:00
);
}
}
export default injectIntl(ColumnSettings);