From 67a1686bc82d19b1f580ed09a1865ed65265b70f Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 15 Oct 2021 17:15:03 -0500 Subject: [PATCH] Federated timeline: restore column settings --- .../components/column_settings.js | 39 +++++++++++++------ app/soapbox/features/public_timeline/index.js | 3 +- 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/app/soapbox/features/public_timeline/components/column_settings.js b/app/soapbox/features/public_timeline/components/column_settings.js index 1d7bd7359..fcaccb6ee 100644 --- a/app/soapbox/features/public_timeline/components/column_settings.js +++ b/app/soapbox/features/public_timeline/components/column_settings.js @@ -1,33 +1,50 @@ import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import { injectIntl, FormattedMessage } from 'react-intl'; +import { injectIntl, defineMessages, FormattedMessage } from 'react-intl'; +import IconButton from 'soapbox/components/icon_button'; import SettingToggle from '../../notifications/components/setting_toggle'; +const messages = defineMessages({ + close: { id: 'lightbox.close', defaultMessage: 'Close' }, +}); + export default @injectIntl class ColumnSettings extends React.PureComponent { static propTypes = { + intl: PropTypes.object.isRequired, settings: ImmutablePropTypes.map.isRequired, onChange: PropTypes.func.isRequired, - intl: PropTypes.object.isRequired, + onClose: PropTypes.func.isRequired, }; render() { - const { settings, onChange } = this.props; + const { intl, settings, onChange, onClose } = this.props; return ( -
-
- } /> +
+
+

+ +

+
+ +
-
- } /> -
+
+
+ } /> +
-
- } /> +
+ } /> +
+ +
+ } /> +
); diff --git a/app/soapbox/features/public_timeline/index.js b/app/soapbox/features/public_timeline/index.js index bf840c24e..aacf784bb 100644 --- a/app/soapbox/features/public_timeline/index.js +++ b/app/soapbox/features/public_timeline/index.js @@ -4,6 +4,7 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import PropTypes from 'prop-types'; import StatusListContainer from '../ui/containers/status_list_container'; import Column from '../../components/column'; +import ColumnSettings from './containers/column_settings_container'; import Accordion from 'soapbox/features/ui/components/accordion'; import PinnedHostsPicker from '../remote_timeline/components/pinned_hosts_picker'; import { expandPublicTimeline } from '../../actions/timelines'; @@ -98,7 +99,7 @@ class CommunityTimeline extends React.PureComponent { return ( - + {showExplanationBox &&