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

35 lines
1.3 KiB
JavaScript
Raw Normal View History

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