diff options
author | Starfall <us@starfall.systems> | 2023-04-14 19:22:47 -0500 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2023-04-14 19:22:47 -0500 |
commit | 4fe1689de43f4404eb9530fcfbcbfb26d6c1c13a (patch) | |
tree | 6811b845bb7f4966b10dcefa3dea404246f161c7 /app/javascript/mastodon/features/report/statuses.js | |
parent | 65c1e53a32cabcdbb7bca57002bb0f6acdebe07e (diff) | |
parent | bed63f6dae0879ac840066b031229e0d139089cd (diff) |
Diffstat (limited to 'app/javascript/mastodon/features/report/statuses.js')
-rw-r--r-- | app/javascript/mastodon/features/report/statuses.js | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/app/javascript/mastodon/features/report/statuses.js b/app/javascript/mastodon/features/report/statuses.js deleted file mode 100644 index d5d86034f..000000000 --- a/app/javascript/mastodon/features/report/statuses.js +++ /dev/null @@ -1,61 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import ImmutablePropTypes from 'react-immutable-proptypes'; -import { connect } from 'react-redux'; -import StatusCheckBox from 'mastodon/features/report/containers/status_check_box_container'; -import { OrderedSet } from 'immutable'; -import { FormattedMessage } from 'react-intl'; -import Button from 'mastodon/components/button'; -import LoadingIndicator from 'mastodon/components/loading_indicator'; - -const mapStateToProps = (state, { accountId }) => ({ - availableStatusIds: OrderedSet(state.getIn(['timelines', `account:${accountId}:with_replies`, 'items'])), - isLoading: state.getIn(['timelines', `account:${accountId}:with_replies`, 'isLoading']), -}); - -export default @connect(mapStateToProps) -class Statuses extends React.PureComponent { - - static propTypes = { - onNextStep: PropTypes.func.isRequired, - accountId: PropTypes.string.isRequired, - availableStatusIds: ImmutablePropTypes.set.isRequired, - selectedStatusIds: ImmutablePropTypes.set.isRequired, - isLoading: PropTypes.bool, - onToggle: PropTypes.func.isRequired, - }; - - handleNextClick = () => { - const { onNextStep } = this.props; - onNextStep('comment'); - }; - - render () { - const { availableStatusIds, selectedStatusIds, onToggle, isLoading } = this.props; - - return ( - <React.Fragment> - <h3 className='report-dialog-modal__title'><FormattedMessage id='report.statuses.title' defaultMessage='Are there any posts that back up this report?' /></h3> - <p className='report-dialog-modal__lead'><FormattedMessage id='report.statuses.subtitle' defaultMessage='Select all that apply' /></p> - - <div className='report-dialog-modal__statuses'> - {isLoading ? <LoadingIndicator /> : availableStatusIds.union(selectedStatusIds).map(statusId => ( - <StatusCheckBox - id={statusId} - key={statusId} - checked={selectedStatusIds.includes(statusId)} - onToggle={onToggle} - /> - ))} - </div> - - <div className='flex-spacer' /> - - <div className='report-dialog-modal__actions'> - <Button onClick={this.handleNextClick}><FormattedMessage id='report.next' defaultMessage='Next' /></Button> - </div> - </React.Fragment> - ); - } - -} |