diff --git a/packages/backend/assets/notification-badges/suitcase-solid.png b/packages/backend/assets/notification-badges/suitcase-solid.png new file mode 100644 index 000000000..b52688586 Binary files /dev/null and b/packages/backend/assets/notification-badges/suitcase-solid.png differ diff --git a/packages/client/src/components/notification.vue b/packages/client/src/components/notification.vue index 43ceb38a4..ee0c446b6 100644 --- a/packages/client/src/components/notification.vue +++ b/packages/client/src/components/notification.vue @@ -15,6 +15,7 @@ + {{ i18n.ts.reject }} + + {{ i18n.ts.moved }} +
+
diff --git a/packages/sw/src/scripts/create-notification.ts b/packages/sw/src/scripts/create-notification.ts index 9d5e31335..873840943 100644 --- a/packages/sw/src/scripts/create-notification.ts +++ b/packages/sw/src/scripts/create-notification.ts @@ -217,6 +217,20 @@ async function composeNotification(data ], }]; + case 'move': + return [t('_notification.moved', { name: getUserName(data.body.user) }), { + body: getUserName(data.body.moveTarget), + icon: data.body.moveTarget.avatarUrl, + badge: iconUrl('suitcase'), + data, + action: [ + { + action: 'accept', + title: t('follow'), + }, + ], + }]; + case 'app': return [data.body.header || data.body.body, { body: data.body.header && data.body.body, diff --git a/packages/sw/src/sw.ts b/packages/sw/src/sw.ts index 10cfc69d3..67846cea6 100644 --- a/packages/sw/src/sw.ts +++ b/packages/sw/src/sw.ts @@ -96,6 +96,9 @@ self.addEventListener('notificationclick',