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