0
0
Fork 0

Change mute, block and domain block confirmations in web UI (#29576)

This commit is contained in:
Eugen Rochko 2024-03-15 18:36:41 +01:00 committed by GitHub
parent be7a68b095
commit ec19d0a14b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 620 additions and 349 deletions

View file

@ -1,4 +1,4 @@
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { defineMessages, injectIntl } from 'react-intl';
import { connect } from 'react-redux';
@ -15,7 +15,7 @@ import {
directCompose,
} from '../actions/compose';
import {
blockDomain,
initDomainBlockModal,
unblockDomain,
} from '../actions/domain_blocks';
import {
@ -253,15 +253,8 @@ const mapDispatchToProps = (dispatch, { intl, contextType }) => ({
dispatch(toggleStatusCollapse(status.get('id'), isCollapsed));
},
onBlockDomain (domain) {
dispatch(openModal({
modalType: 'CONFIRM',
modalProps: {
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. You will not see content from that domain in any public timelines or your notifications. Your followers from that domain will be removed.' values={{ domain: <strong>{domain}</strong> }} />,
confirm: intl.formatMessage(messages.blockDomainConfirm),
onConfirm: () => dispatch(blockDomain(domain)),
},
}));
onBlockDomain (account) {
dispatch(initDomainBlockModal(account));
},
onUnblockDomain (domain) {