Removed domain blocks

• Removed:
- domain blocks as we are not using any other domains than gab.com
This commit is contained in:
mgabdev
2020-06-06 20:14:20 -04:00
parent b7e24f4245
commit 7b4faf3bf5
12 changed files with 1 additions and 416 deletions

View File

@@ -1,46 +0,0 @@
import { injectIntl, defineMessages } from 'react-intl'
import { blockDomain } from '../../actions/domain_blocks'
import ConfirmationModal from './confirmation_modal'
const messages = defineMessages({
blockDomain: { id: 'block_domain', defaultMessage: 'Block {domain}' },
blockDomainConfirm: { id: 'confirmations.domain_block.confirm', defaultMessage: 'Block entire domain' },
blockDomainMessage: { 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. You will not see content from that domain in any public timelines or your notifications. Your followers from that domain will be removed.' },
cancel: { id: 'confirmation_modal.cancel', defaultMessage: 'Cancel' },
})
const mapDispatchToProps = (dispatch) => ({
onConfirm: (domain) => dispatch(blockDomain(domain)),
})
export default
@connect(null, mapDispatchToProps)
@injectIntl
class BlockDomainModal extends PureComponent {
static propTypes = {
domain: PropTypes.string.isRequired,
intl: PropTypes.object.isRequired,
onConfirm: PropTypes.func.isRequired,
onClose: PropTypes.func.isRequired,
}
handleClick = () => {
this.props.onConfirm(this.props.domain)
}
render() {
const { onClose, domain, intl } = this.props
return (
<ConfirmationModal
title={intl.formatMessage(messages.blockDomain, { domain })}
message={intl.formatMessage(messages.blockDomainMessage, { domain })}
confirm={intl.formatMessage(messages.blockDomainConfirm)}
onConfirm={this.handleClick}
onClose={onClose}
/>
)
}
}

View File

@@ -7,7 +7,6 @@ import BundleModalError from '../bundle_modal_error'
import {
MODAL_ACTIONS,
MODAL_BLOCK_ACCOUNT,
MODAL_BLOCK_DOMAIN,
MODAL_BOOST,
MODAL_COMMUNITY_TIMELINE_SETTINGS,
MODAL_COMPOSE,
@@ -41,7 +40,6 @@ import {
import {
ActionsModal,
BlockAccountModal,
BlockDomainModal,
BoostModal,
CommunityTimelineSettingsModal,
ComposeModal,
@@ -76,7 +74,6 @@ import {
const MODAL_COMPONENTS = {}
MODAL_COMPONENTS[MODAL_ACTIONS] = ActionsModal
MODAL_COMPONENTS[MODAL_BLOCK_ACCOUNT] = BlockAccountModal
MODAL_COMPONENTS[MODAL_BLOCK_DOMAIN] = BlockDomainModal
MODAL_COMPONENTS[MODAL_BOOST] = BoostModal
MODAL_COMPONENTS[MODAL_COMMUNITY_TIMELINE_SETTINGS] = CommunityTimelineSettingsModal
MODAL_COMPONENTS[MODAL_COMPOSE] = ComposeModal
@@ -109,7 +106,6 @@ MODAL_COMPONENTS[MODAL_VIDEO] = VideoModal
const CENTERED_XS_MODALS = [
MODAL_BLOCK_ACCOUNT,
MODAL_BLOCK_DOMAIN,
MODAL_CONFIRM,
MODAL_GROUP_DELETE,
MODAL_LIST_DELETE,