commit: 63eef6f96589b208699ddbd1b8abd4b5add8dc52
parent: 36721239b2985bea833ff684e60efc28d517d36c
Author: Morgan Bazalgette <the@howl.moe>
Date: Sat, 31 Mar 2018 12:21:05 +0200
remove domain blocks
Diffstat:
6 files changed, 1 insertion(+), 55 deletions(-)
diff --git a/app/javascript/mastodon/features/account/components/action_bar.js b/app/javascript/mastodon/features/account/components/action_bar.js
@@ -19,8 +19,6 @@ const messages = defineMessages({
report: { id: 'account.report', defaultMessage: 'Report @{name}' },
share: { id: 'account.share', defaultMessage: 'Share @{name}\'s profile' },
media: { id: 'account.media', defaultMessage: 'Media' },
- blockDomain: { id: 'account.block_domain', defaultMessage: 'Hide everything from {domain}' },
- unblockDomain: { id: 'account.unblock_domain', defaultMessage: 'Unhide {domain}' },
hideReblogs: { id: 'account.hide_reblogs', defaultMessage: 'Hide boosts from @{name}' },
showReblogs: { id: 'account.show_reblogs', defaultMessage: 'Show boosts from @{name}' },
});
@@ -37,8 +35,6 @@ export default class ActionBar extends React.PureComponent {
onReblogToggle: PropTypes.func.isRequired,
onReport: PropTypes.func.isRequired,
onMute: PropTypes.func.isRequired,
- onBlockDomain: PropTypes.func.isRequired,
- onUnblockDomain: PropTypes.func.isRequired,
intl: PropTypes.object.isRequired,
};
@@ -90,8 +86,6 @@ export default class ActionBar extends React.PureComponent {
}
if (account.get('acct') !== account.get('username')) {
- const domain = account.get('acct').split('@')[1];
-
extraInfo = (
<div className='account__disclaimer'>
<FormattedMessage
@@ -106,12 +100,6 @@ export default class ActionBar extends React.PureComponent {
);
menu.push(null);
-
- if (account.getIn(['relationship', 'domain_blocking'])) {
- menu.push({ text: intl.formatMessage(messages.unblockDomain, { domain }), action: this.props.onUnblockDomain });
- } else {
- menu.push({ text: intl.formatMessage(messages.blockDomain, { domain }), action: this.props.onBlockDomain });
- }
}
return (
diff --git a/app/javascript/mastodon/features/account_timeline/components/header.js b/app/javascript/mastodon/features/account_timeline/components/header.js
@@ -20,8 +20,6 @@ export default class Header extends ImmutablePureComponent {
onReblogToggle: PropTypes.func.isRequired,
onReport: PropTypes.func.isRequired,
onMute: PropTypes.func.isRequired,
- onBlockDomain: PropTypes.func.isRequired,
- onUnblockDomain: PropTypes.func.isRequired,
hideTabs: PropTypes.bool,
};
@@ -57,22 +55,6 @@ export default class Header extends ImmutablePureComponent {
this.props.onMute(this.props.account);
}
- handleBlockDomain = () => {
- const domain = this.props.account.get('acct').split('@')[1];
-
- if (!domain) return;
-
- this.props.onBlockDomain(domain);
- }
-
- handleUnblockDomain = () => {
- const domain = this.props.account.get('acct').split('@')[1];
-
- if (!domain) return;
-
- this.props.onUnblockDomain(domain);
- }
-
render () {
const { account, hideTabs } = this.props;
@@ -98,8 +80,6 @@ export default class Header extends ImmutablePureComponent {
onReblogToggle={this.handleReblogToggle}
onReport={this.handleReport}
onMute={this.handleMute}
- onBlockDomain={this.handleBlockDomain}
- onUnblockDomain={this.handleUnblockDomain}
/>
{!hideTabs && (
diff --git a/app/javascript/mastodon/features/account_timeline/containers/header_container.js b/app/javascript/mastodon/features/account_timeline/containers/header_container.js
@@ -16,14 +16,12 @@ import {
import { initMuteModal } from '../../../actions/mutes';
import { initReport } from '../../../actions/reports';
import { openModal } from '../../../actions/modal';
-import { blockDomain, unblockDomain } from '../../../actions/domain_blocks';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { unfollowModal } from '../../../initial_state';
const messages = defineMessages({
unfollowConfirm: { id: 'confirmations.unfollow.confirm', defaultMessage: 'Unfollow' },
blockConfirm: { id: 'confirmations.block.confirm', defaultMessage: 'Block' },
- blockDomainConfirm: { id: 'confirmations.domain_block.confirm', defaultMessage: 'Hide entire domain' },
});
const makeMapStateToProps = () => {
@@ -92,20 +90,7 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
} else {
dispatch(initMuteModal(account));
}
- },
-
- onBlockDomain (domain) {
- dispatch(openModal('CONFIRM', {
- message: <FormattedMessage id='confirmations.domain_block.message' defaultMessage='Are you really, really sure you want to block the entire {domain}? In most cases a few targeted blocks or mutes are sufficient and preferable.' values={{ domain: <strong>{domain}</strong> }} />,
- confirm: intl.formatMessage(messages.blockDomainConfirm),
- onConfirm: () => dispatch(blockDomain(domain)),
- }));
- },
-
- onUnblockDomain (domain) {
- dispatch(unblockDomain(domain));
- },
-
+ }
});
export default injectIntl(connect(makeMapStateToProps, mapDispatchToProps)(Header));
diff --git a/app/javascript/mastodon/features/getting_started/index.js b/app/javascript/mastodon/features/getting_started/index.js
@@ -24,7 +24,6 @@ const messages = defineMessages({
sign_out: { id: 'navigation_bar.logout', defaultMessage: 'Logout' },
favourites: { id: 'navigation_bar.favourites', defaultMessage: 'Favourites' },
blocks: { id: 'navigation_bar.blocks', defaultMessage: 'Blocked users' },
- domain_blocks: { id: 'navigation_bar.domain_blocks', defaultMessage: 'Hidden domains' },
mutes: { id: 'navigation_bar.mutes', defaultMessage: 'Muted users' },
info: { id: 'navigation_bar.info', defaultMessage: 'Extended information' },
lists: { id: 'navigation_bar.lists', defaultMessage: 'Lists' },
diff --git a/app/javascript/mastodon/features/ui/index.js b/app/javascript/mastodon/features/ui/index.js
@@ -37,7 +37,6 @@ import {
FavouritedStatuses,
ListTimeline,
Blocks,
- DomainBlocks,
Mutes,
Lists,
} from './util/async-components';
@@ -156,7 +155,6 @@ class SwitchingColumnsArea extends React.PureComponent {
<WrappedRoute path='/follow_requests' component={FollowRequests} content={children} />
<WrappedRoute path='/blocks' component={Blocks} content={children} />
- <WrappedRoute path='/domain_blocks' component={DomainBlocks} content={children} />
<WrappedRoute path='/mutes' component={Mutes} content={children} />
<WrappedRoute path='/lists' component={Lists} content={children} />
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 Blocks () {
return import(/* webpackChunkName: "features/blocks" */'../../blocks');
}
-export function DomainBlocks () {
- return import(/* webpackChunkName: "features/domain_blocks" */'../../domain_blocks');
-}
-
export function Mutes () {
return import(/* webpackChunkName: "features/mutes" */'../../mutes');
}