Change mute, block and domain block confirmations in web UI (#29576)
This commit is contained in:
		
					parent
					
						
							
								be7a68b095
							
						
					
				
			
			
				commit
				
					
						ec19d0a14b
					
				
			
		
					 27 changed files with 620 additions and 349 deletions
				
			
		
							
								
								
									
										39
									
								
								app/javascript/mastodon/components/check_box.tsx
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								app/javascript/mastodon/components/check_box.tsx
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,39 @@ | |||
| import classNames from 'classnames'; | ||||
| 
 | ||||
| import DoneIcon from '@/material-icons/400-24px/done.svg?react'; | ||||
| 
 | ||||
| import { Icon } from './icon'; | ||||
| 
 | ||||
| interface Props { | ||||
|   value: string; | ||||
|   checked: boolean; | ||||
|   name: string; | ||||
|   onChange: (event: React.ChangeEvent<HTMLInputElement>) => void; | ||||
|   label: React.ReactNode; | ||||
| } | ||||
| 
 | ||||
| export const CheckBox: React.FC<Props> = ({ | ||||
|   name, | ||||
|   value, | ||||
|   checked, | ||||
|   onChange, | ||||
|   label, | ||||
| }) => { | ||||
|   return ( | ||||
|     <label className='check-box'> | ||||
|       <input | ||||
|         name={name} | ||||
|         type='checkbox' | ||||
|         value={value} | ||||
|         checked={checked} | ||||
|         onChange={onChange} | ||||
|       /> | ||||
| 
 | ||||
|       <span className={classNames('check-box__input', { checked })}> | ||||
|         {checked && <Icon id='check' icon={DoneIcon} />} | ||||
|       </span> | ||||
| 
 | ||||
|       <span>{label}</span> | ||||
|     </label> | ||||
|   ); | ||||
| }; | ||||
|  | @ -209,7 +209,7 @@ class StatusActionBar extends ImmutablePureComponent { | |||
|     const { status, onBlockDomain } = this.props; | ||||
|     const account = status.get('account'); | ||||
| 
 | ||||
|     onBlockDomain(account.get('acct').split('@')[1]); | ||||
|     onBlockDomain(account); | ||||
|   }; | ||||
| 
 | ||||
|   handleUnblockDomain = () => { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue