logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

column_settings.js (1191B)


  1. import React from 'react';
  2. import PropTypes from 'prop-types';
  3. import ImmutablePropTypes from 'react-immutable-proptypes';
  4. import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
  5. import SettingText from '../../../components/setting_text';
  6. const messages = defineMessages({
  7. filter_regex: { id: 'home.column_settings.filter_regex', defaultMessage: 'Filter out by regular expressions' },
  8. settings: { id: 'home.settings', defaultMessage: 'Column settings' },
  9. });
  10. @injectIntl
  11. export default class ColumnSettings extends React.PureComponent {
  12. static propTypes = {
  13. settings: ImmutablePropTypes.map.isRequired,
  14. onChange: PropTypes.func.isRequired,
  15. intl: PropTypes.object.isRequired,
  16. };
  17. render () {
  18. const { settings, onChange, intl } = this.props;
  19. return (
  20. <div>
  21. <span className='column-settings__section'><FormattedMessage id='home.column_settings.advanced' defaultMessage='Advanced' /></span>
  22. <div className='column-settings__row'>
  23. <SettingText settings={settings} settingKey={['regex', 'body']} onChange={onChange} label={intl.formatMessage(messages.filter_regex)} />
  24. </div>
  25. </div>
  26. );
  27. }
  28. }