0
0
instrumental/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-11 01:25:10 +09:00
import SettingToggle from '../../notifications/components/setting_toggle';
2023-05-23 17:52:27 +09:00
class ColumnSettings extends PureComponent {
2017-01-11 01:25:10 +09:00
static propTypes = {
settings: ImmutablePropTypes.map.isRequired,
onChange: PropTypes.func.isRequired,
intl: PropTypes.object.isRequired,
};
2017-01-11 01:25:10 +09:00
render () {
const { settings, onChange } = this.props;
2017-01-11 01:25:10 +09:00
return (
<div>
<span className='column-settings__section'><FormattedMessage id='home.column_settings.basic' defaultMessage='Basic' /></span>
2017-01-11 01:25:10 +09:00
<div className='column-settings__row'>
2017-12-26 00:14:06 +09: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-11 01:25:10 +09:00
<div className='column-settings__row'>
2017-12-26 00:14:06 +09: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-11 01:25:10 +09:00
);
}
}
export default injectIntl(ColumnSettings);