diff options
author | Takeshi Umeda <noel.yoshiba@gmail.com> | 2020-05-10 17:36:18 +0900 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2020-05-10 16:19:59 +0200 |
commit | 559214c33fc0c5b5ee621eb2719fa1a15ac9da95 (patch) | |
tree | 707e03213cf88698f41fcb8062967204fcd1879a /app/javascript/flavours/glitch/features/public_timeline/components | |
parent | 51508e50613322b6be359f0dd7475f0129509f98 (diff) |
[Glitch] Add remote only to public timeline
Port 26b08a3c54847f2816f78c3ac67ace001d3fea1f to glitch-soc Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/public_timeline/components')
-rw-r--r-- | app/javascript/flavours/glitch/features/public_timeline/components/column_settings.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/features/public_timeline/components/column_settings.js b/app/javascript/flavours/glitch/features/public_timeline/components/column_settings.js new file mode 100644 index 000000000..756b6fe06 --- /dev/null +++ b/app/javascript/flavours/glitch/features/public_timeline/components/column_settings.js @@ -0,0 +1,30 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import ImmutablePropTypes from 'react-immutable-proptypes'; +import { injectIntl, FormattedMessage } from 'react-intl'; +import SettingToggle from '../../notifications/components/setting_toggle'; + +export default @injectIntl +class ColumnSettings extends React.PureComponent { + + 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> + ); + } + +} |