logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: ca0d4cbc909884fa7c1b470ecc601391840b397f
parent: 96cb34fd9c8ea19d6dc35c6a83c52aaeead6d5b5
Author: Morgan Bazalgette <the@howl.moe>
Date:   Sun,  1 Apr 2018 11:21:39 +0200

remove reporting

Diffstat:

Mapp/javascript/mastodon/components/status_action_bar.js8--------
Mapp/javascript/mastodon/features/account_timeline/components/header.js6------
Mapp/javascript/mastodon/features/account_timeline/containers/header_container.js5-----
Mapp/javascript/mastodon/features/status/components/action_bar.js8--------
Mapp/javascript/mastodon/features/ui/components/modal_root.js2--
Mapp/javascript/mastodon/features/ui/util/async-components.js4----
Mapp/javascript/mastodon/reducers/index.js2--
7 files changed, 0 insertions(+), 35 deletions(-)

diff --git a/app/javascript/mastodon/components/status_action_bar.js b/app/javascript/mastodon/components/status_action_bar.js @@ -19,7 +19,6 @@ const messages = defineMessages({ cannot_reblog: { id: 'status.cannot_reblog', defaultMessage: 'This post cannot be boosted' }, favourite: { id: 'status.favourite', defaultMessage: 'Favourite' }, open: { id: 'status.open', defaultMessage: 'Expand this status' }, - report: { id: 'status.report', defaultMessage: 'Report @{name}' }, muteConversation: { id: 'status.mute_conversation', defaultMessage: 'Mute conversation' }, unmuteConversation: { id: 'status.unmute_conversation', defaultMessage: 'Unmute conversation' }, }); @@ -39,7 +38,6 @@ export default class StatusActionBar extends ImmutablePureComponent { onDelete: PropTypes.func, onMention: PropTypes.func, onBlock: PropTypes.func, - onReport: PropTypes.func, onMuteConversation: PropTypes.func, onPin: PropTypes.func, withDismiss: PropTypes.bool, @@ -94,10 +92,6 @@ export default class StatusActionBar extends ImmutablePureComponent { this.context.router.history.push(`/statuses/${this.props.status.get('id')}`); } - handleReport = () => { - this.props.onReport(this.props.status); - } - handleConversationMuteClick = () => { this.props.onMuteConversation(this.props.status); } @@ -127,9 +121,7 @@ export default class StatusActionBar extends ImmutablePureComponent { menu.push({ text: intl.formatMessage(messages.delete), action: this.handleDeleteClick }); } else { menu.push({ text: intl.formatMessage(messages.mention, { name: status.getIn(['account', 'username']) }), action: this.handleMentionClick }); - menu.push(null); menu.push({ text: intl.formatMessage(messages.block, { name: status.getIn(['account', 'username']) }), action: this.handleBlockClick }); - menu.push({ text: intl.formatMessage(messages.report, { name: status.getIn(['account', 'username']) }), action: this.handleReport }); } if (status.get('visibility') === 'direct') { diff --git a/app/javascript/mastodon/features/account_timeline/components/header.js b/app/javascript/mastodon/features/account_timeline/components/header.js @@ -18,7 +18,6 @@ export default class Header extends ImmutablePureComponent { onMention: PropTypes.func.isRequired, onDirect: PropTypes.func.isRequired, onReblogToggle: PropTypes.func.isRequired, - onReport: PropTypes.func.isRequired, onMute: PropTypes.func.isRequired, hideTabs: PropTypes.bool, }; @@ -43,10 +42,6 @@ export default class Header extends ImmutablePureComponent { this.props.onDirect(this.props.account, this.context.router.history); } - handleReport = () => { - this.props.onReport(this.props.account); - } - handleReblogToggle = () => { this.props.onReblogToggle(this.props.account); } @@ -78,7 +73,6 @@ export default class Header extends ImmutablePureComponent { onMention={this.handleMention} onDirect={this.handleDirect} onReblogToggle={this.handleReblogToggle} - onReport={this.handleReport} onMute={this.handleMute} /> diff --git a/app/javascript/mastodon/features/account_timeline/containers/header_container.js b/app/javascript/mastodon/features/account_timeline/containers/header_container.js @@ -14,7 +14,6 @@ import { directCompose, } from '../../../actions/compose'; import { initMuteModal } from '../../../actions/mutes'; -import { initReport } from '../../../actions/reports'; import { openModal } from '../../../actions/modal'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import { unfollowModal } from '../../../initial_state'; @@ -80,10 +79,6 @@ const mapDispatchToProps = (dispatch, { intl }) => ({ } }, - onReport (account) { - dispatch(initReport(account)); - }, - onMute (account) { if (account.getIn(['relationship', 'muting'])) { dispatch(unmuteAccount(account.get('id'))); diff --git a/app/javascript/mastodon/features/status/components/action_bar.js b/app/javascript/mastodon/features/status/components/action_bar.js @@ -16,7 +16,6 @@ const messages = defineMessages({ muteConversation: { id: 'status.mute_conversation', defaultMessage: 'Mute conversation' }, unmuteConversation: { id: 'status.unmute_conversation', defaultMessage: 'Unmute conversation' }, block: { id: 'status.block', defaultMessage: 'Block @{name}' }, - report: { id: 'status.report', defaultMessage: 'Report @{name}' }, share: { id: 'status.share', defaultMessage: 'Share' }, }); @@ -36,7 +35,6 @@ export default class ActionBar extends React.PureComponent { onMention: PropTypes.func.isRequired, onMuteConversation: PropTypes.func, onBlock: PropTypes.func, - onReport: PropTypes.func, onPin: PropTypes.func, intl: PropTypes.object.isRequired, }; @@ -69,10 +67,6 @@ export default class ActionBar extends React.PureComponent { this.props.onBlock(this.props.status.get('account')); } - handleReport = () => { - this.props.onReport(this.props.status); - } - handlePinClick = () => { this.props.onPin(this.props.status); } @@ -98,9 +92,7 @@ export default class ActionBar extends React.PureComponent { menu.push({ text: intl.formatMessage(messages.delete), action: this.handleDeleteClick }); } else { menu.push({ text: intl.formatMessage(messages.mention, { name: status.getIn(['account', 'username']) }), action: this.handleMentionClick }); - menu.push(null); menu.push({ text: intl.formatMessage(messages.block, { name: status.getIn(['account', 'username']) }), action: this.handleBlockClick }); - menu.push({ text: intl.formatMessage(messages.report, { name: status.getIn(['account', 'username']) }), action: this.handleReport }); } const shareButton = ('share' in navigator) && status.get('visibility') === 'public' && ( diff --git a/app/javascript/mastodon/features/ui/components/modal_root.js b/app/javascript/mastodon/features/ui/components/modal_root.js @@ -12,7 +12,6 @@ import ConfirmationModal from './confirmation_modal'; import FocalPointModal from './focal_point_modal'; import { OnboardingModal, - ReportModal, ListEditor, } from '../../../features/ui/util/async-components'; @@ -22,7 +21,6 @@ const MODAL_COMPONENTS = { 'VIDEO': () => Promise.resolve({ default: VideoModal }), 'BOOST': () => Promise.resolve({ default: BoostModal }), 'CONFIRM': () => Promise.resolve({ default: ConfirmationModal }), - 'REPORT': ReportModal, 'ACTIONS': () => Promise.resolve({ default: ActionsModal }), 'LIST_EDITOR': ListEditor, 'FOCAL_POINT': () => Promise.resolve({ default: FocalPointModal }), diff --git a/app/javascript/mastodon/features/ui/util/async-components.js b/app/javascript/mastodon/features/ui/util/async-components.js @@ -86,10 +86,6 @@ export function OnboardingModal () { return import(/* webpackChunkName: "modals/onboarding_modal" */'../components/onboarding_modal'); } -export function ReportModal () { - return import(/* webpackChunkName: "modals/report_modal" */'../components/report_modal'); -} - export function MediaGallery () { return import(/* webpackChunkName: "status/media_gallery" */'../../../components/media_gallery'); } diff --git a/app/javascript/mastodon/reducers/index.js b/app/javascript/mastodon/reducers/index.js @@ -15,7 +15,6 @@ import settings from './settings'; import push_notifications from './push_notifications'; import status_lists from './status_lists'; import cards from './cards'; -import reports from './reports'; import contexts from './contexts'; import compose from './compose'; import search from './search'; @@ -42,7 +41,6 @@ const reducers = { settings, push_notifications, cards, - reports, contexts, compose, search,