sforkowany z mirror/soapbox
				
			Do not include link to profile in ReplyMentionsModal
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>deduplicate
							rodzic
							
								
									bcf82e4312
								
							
						
					
					
						commit
						c792cc2549
					
				|  | @ -15,14 +15,17 @@ import type { Account as AccountEntity } from 'soapbox/types/entities'; | |||
| 
 | ||||
| interface IInstanceFavicon { | ||||
|   account: AccountEntity, | ||||
|   disabled?: boolean, | ||||
| } | ||||
| 
 | ||||
| const InstanceFavicon: React.FC<IInstanceFavicon> = ({ account }) => { | ||||
| const InstanceFavicon: React.FC<IInstanceFavicon> = ({ account, disabled }) => { | ||||
|   const history = useHistory(); | ||||
| 
 | ||||
|   const handleClick: React.MouseEventHandler = (e) => { | ||||
|     e.stopPropagation(); | ||||
| 
 | ||||
|     if (disabled) return; | ||||
| 
 | ||||
|     const timelineUrl = `/timeline/${account.domain}`; | ||||
|     if (!(e.ctrlKey || e.metaKey)) { | ||||
|       history.push(timelineUrl); | ||||
|  | @ -32,7 +35,11 @@ const InstanceFavicon: React.FC<IInstanceFavicon> = ({ account }) => { | |||
|   }; | ||||
| 
 | ||||
|   return ( | ||||
|     <button className='w-4 h-4 flex-none focus:ring-primary-500 focus:ring-2 focus:ring-offset-2' onClick={handleClick}> | ||||
|     <button | ||||
|       className='w-4 h-4 flex-none focus:ring-primary-500 focus:ring-2 focus:ring-offset-2' | ||||
|       onClick={handleClick} | ||||
|       disabled={disabled} | ||||
|     > | ||||
|       <img src={account.favicon} alt='' title={account.domain} className='w-full max-h-full' /> | ||||
|     </button> | ||||
|   ); | ||||
|  | @ -219,7 +226,7 @@ const Account = ({ | |||
|                 <Text theme='muted' size='sm' truncate>@{username}</Text> | ||||
| 
 | ||||
|                 {account.favicon && ( | ||||
|                   <InstanceFavicon account={account} /> | ||||
|                   <InstanceFavicon account={account} disabled={!withLinkToProfile} /> | ||||
|                 )} | ||||
| 
 | ||||
|                 {(timestamp) ? ( | ||||
|  |  | |||
|  | @ -52,7 +52,7 @@ const Account: React.FC<IAccount> = ({ composeId, accountId, author }) => { | |||
|   return ( | ||||
|     <HStack space={1} alignItems='center' justifyContent='between' className='p-2.5'> | ||||
|       <div className='w-full'> | ||||
|         <AccountComponent account={account} withRelationship={false} /> | ||||
|         <AccountComponent account={account} withRelationship={false} withLinkToProfile={false} /> | ||||
|       </div> | ||||
|       {!author && button} | ||||
|     </HStack> | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 marcin mikołajczak
						marcin mikołajczak