Grouped Notifications UI (#30440)
Co-authored-by: Eugen Rochko <eugen@zeonfederated.com> Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
		
					parent
					
						
							
								7d090b2ab6
							
						
					
				
			
			
				commit
				
					
						f587ff643f
					
				
			
		
					 65 changed files with 3329 additions and 131 deletions
				
			
		|  | @ -0,0 +1,31 @@ | |||
| import { FormattedMessage } from 'react-intl'; | ||||
| 
 | ||||
| import PersonAddIcon from '@/material-icons/400-24px/person_add-fill.svg?react'; | ||||
| import type { NotificationGroupFollow } from 'mastodon/models/notification_group'; | ||||
| 
 | ||||
| import type { LabelRenderer } from './notification_group_with_status'; | ||||
| import { NotificationGroupWithStatus } from './notification_group_with_status'; | ||||
| 
 | ||||
| const labelRenderer: LabelRenderer = (values) => ( | ||||
|   <FormattedMessage | ||||
|     id='notification.follow' | ||||
|     defaultMessage='{name} followed you' | ||||
|     values={values} | ||||
|   /> | ||||
| ); | ||||
| 
 | ||||
| export const NotificationFollow: React.FC<{ | ||||
|   notification: NotificationGroupFollow; | ||||
|   unread: boolean; | ||||
| }> = ({ notification, unread }) => ( | ||||
|   <NotificationGroupWithStatus | ||||
|     type='follow' | ||||
|     icon={PersonAddIcon} | ||||
|     iconId='person-add' | ||||
|     accountIds={notification.sampleAccountIds} | ||||
|     timestamp={notification.latest_page_notification_at} | ||||
|     count={notification.notifications_count} | ||||
|     labelRenderer={labelRenderer} | ||||
|     unread={unread} | ||||
|   /> | ||||
| ); | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue