2023-05-23 11:52:27 +03:00
|
|
|
import { PureComponent } from 'react';
|
2020-05-10 11:36:18 +03:00
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
|
|
import { injectIntl, FormattedMessage } from 'react-intl';
|
|
|
|
import SettingToggle from '../../notifications/components/setting_toggle';
|
|
|
|
|
2023-05-23 11:52:27 +03:00
|
|
|
class ColumnSettings extends PureComponent {
|
2020-05-10 11:36:18 +03:00
|
|
|
|
|
|
|
static propTypes = {
|
|
|
|
settings: ImmutablePropTypes.map.isRequired,
|
|
|
|
onChange: PropTypes.func.isRequired,
|
|
|
|
intl: PropTypes.object.isRequired,
|
|
|
|
columnId: PropTypes.string,
|
|
|
|
};
|
|
|
|
|
|
|
|
render () {
|
|
|
|
const { settings, onChange } = this.props;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<div className='column-settings__row'>
|
|
|
|
<SettingToggle settings={settings} settingPath={['other', 'onlyMedia']} onChange={onChange} label={<FormattedMessage id='community.column_settings.media_only' defaultMessage='Media only' />} />
|
|
|
|
<SettingToggle settings={settings} settingPath={['other', 'onlyRemote']} onChange={onChange} label={<FormattedMessage id='community.column_settings.remote_only' defaultMessage='Remote only' />} />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2023-03-24 04:17:53 +02:00
|
|
|
|
|
|
|
export default injectIntl(ColumnSettings);
|