diff --git a/src/components/ICONS.jsx b/src/components/ICONS.jsx index 9813777..dfbb164 100644 --- a/src/components/ICONS.jsx +++ b/src/components/ICONS.jsx @@ -106,5 +106,5 @@ export const ICONS = { copy: () => import('@iconify-icons/mingcute/copy-2-line'), quote: () => import('@iconify-icons/mingcute/quote-left-line'), settings: () => import('@iconify-icons/mingcute/settings-6-line'), - unlink: () => import('@iconify-icons/mingcute/unlink-line'), + 'heart-break': () => import('@iconify-icons/mingcute/heart-crack-line'), }; diff --git a/src/components/notification.jsx b/src/components/notification.jsx index a43aa18..85ede98 100644 --- a/src/components/notification.jsx +++ b/src/components/notification.jsx @@ -26,7 +26,7 @@ const NOTIFICATION_ICONS = { update: 'pencil', 'admin.signup': 'account-edit', 'admin.report': 'account-warning', - severed_relationships: 'unlink', + severed_relationships: 'heart-break', emoji_reaction: 'emoji2', 'pleroma:emoji_reaction': 'emoji2', }; @@ -85,16 +85,35 @@ const contentText = { 'favourite+reblog_reply': 'boosted & liked your reply.', 'admin.sign_up': 'signed up.', 'admin.report': (targetAccount) => <>reported {targetAccount}, - severed_relationships: (name) => `Relationships with ${name} severed.`, + severed_relationships: (name) => ( + <> + Lost connections with {name}. + + ), emoji_reaction: emojiText, 'pleroma:emoji_reaction': emojiText, }; // account_suspension, domain_block, user_domain_block const SEVERED_RELATIONSHIPS_TEXT = { - account_suspension: 'Account has been suspended.', - domain_block: 'Domain has been blocked.', - user_domain_block: 'You blocked this domain.', + account_suspension: ({ from, targetName }) => ( + <> + An admin from {from} has suspended {targetName}, which means + you can no longer receive updates from them or interact with them. + + ), + domain_block: ({ from, targetName, followersCount, followingCount }) => ( + <> + An admin from {from} has blocked {targetName}. Affected + followers: {followersCount}, followings: {followingCount}. + + ), + user_domain_block: ({ targetName, followersCount, followingCount }) => ( + <> + You have blocked {targetName}. Removed followers: {followersCount}, + followings: {followingCount}. + + ), }; const AVATARS_LIMIT = 50; @@ -277,42 +296,21 @@ function Notification({ )} {type === 'severed_relationships' && ( - <> -

- - {event?.purge ? ( - 'Purged by administrators.' - ) : ( - <> - {event.relationshipsCount} relationship - {event.relationshipsCount === 1 ? '' : 's'} - {!!event.createdAt && ( - <> - {' '} - •{' '} - - - )} - - )} - -
- {SEVERED_RELATIONSHIPS_TEXT[event.type]} -

-

- - View - -

- +
+ {SEVERED_RELATIONSHIPS_TEXT[event.type]({ + from: instance, + ...event, + })} +
+ + Learn more + + . +
)} )}