Add explanation to mute dialog, refactor and clean up mute/block UI (#11992)
* Add some explanation to the mute modal dialog * Remove `isSubmitting` from mute modal code, this wasn't used * Refactor block modal Signed-off-by: Thibaut Girka <thib@sitedethib.com> * Refactor SCSS a bit * Put mute modal toggle to the same side as in the report dialog for consistency * Reword mute explanation * Fix mute explanation styling * Left-align all text in mute confirmation modal
This commit is contained in:
		@@ -11,7 +11,6 @@ import { toggleHideNotifications } from '../../../actions/mutes';
 | 
			
		||||
 | 
			
		||||
const mapStateToProps = state => {
 | 
			
		||||
  return {
 | 
			
		||||
    isSubmitting: state.getIn(['reports', 'new', 'isSubmitting']),
 | 
			
		||||
    account: state.getIn(['mutes', 'new', 'account']),
 | 
			
		||||
    notifications: state.getIn(['mutes', 'new', 'notifications']),
 | 
			
		||||
  };
 | 
			
		||||
@@ -38,7 +37,6 @@ export default @connect(mapStateToProps, mapDispatchToProps)
 | 
			
		||||
class MuteModal extends React.PureComponent {
 | 
			
		||||
 | 
			
		||||
  static propTypes = {
 | 
			
		||||
    isSubmitting: PropTypes.bool.isRequired,
 | 
			
		||||
    account: PropTypes.object.isRequired,
 | 
			
		||||
    notifications: PropTypes.bool.isRequired,
 | 
			
		||||
    onClose: PropTypes.func.isRequired,
 | 
			
		||||
@@ -81,11 +79,16 @@ class MuteModal extends React.PureComponent {
 | 
			
		||||
              values={{ name: <strong>@{account.get('acct')}</strong> }}
 | 
			
		||||
            />
 | 
			
		||||
          </p>
 | 
			
		||||
          <div>
 | 
			
		||||
            <label htmlFor='mute-modal__hide-notifications-checkbox'>
 | 
			
		||||
          <p className='mute-modal__explanation'>
 | 
			
		||||
            <FormattedMessage
 | 
			
		||||
              id='confirmations.mute.explanation'
 | 
			
		||||
              defaultMessage='This will hide posts from them and posts mentioning them, but it will still allow them to see your posts follow you.'
 | 
			
		||||
            />
 | 
			
		||||
          </p>
 | 
			
		||||
          <div className='setting-toggle'>
 | 
			
		||||
            <Toggle id='mute-modal__hide-notifications-checkbox' checked={notifications} onChange={this.toggleNotifications} />
 | 
			
		||||
            <label className='setting-toggle__label' htmlFor='mute-modal__hide-notifications-checkbox'>
 | 
			
		||||
              <FormattedMessage id='mute_modal.hide_notifications' defaultMessage='Hide notifications from this user?' />
 | 
			
		||||
              {' '}
 | 
			
		||||
              <Toggle id='mute-modal__hide-notifications-checkbox' checked={notifications} onChange={this.toggleNotifications} />
 | 
			
		||||
            </label>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user