chuckya/app/javascript/mastodon/features/home_timeline/components/column_settings.jsx

35 lines
1.3 KiB
React
Raw Normal View History

import React from 'react';
import PropTypes from 'prop-types';
2017-01-11 01:25:10 +09:00
import ImmutablePropTypes from 'react-immutable-proptypes';
import { injectIntl, FormattedMessage } from 'react-intl';
2017-01-11 01:25:10 +09:00
import SettingToggle from '../../notifications/components/setting_toggle';
2018-09-15 00:59:48 +09:00
export default @injectIntl
class ColumnSettings extends React.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
);
}
}