kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Status edits notifications
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>environments/review-develop-3zknud/deployments/669^2
rodzic
7d134fcca3
commit
d05cabe9a8
|
@ -54,6 +54,7 @@ const icons: Record<NotificationType, string> = {
|
||||||
'pleroma:chat_mention': require('@tabler/icons/messages.svg'),
|
'pleroma:chat_mention': require('@tabler/icons/messages.svg'),
|
||||||
'pleroma:emoji_reaction': require('@tabler/icons/mood-happy.svg'),
|
'pleroma:emoji_reaction': require('@tabler/icons/mood-happy.svg'),
|
||||||
user_approved: require('@tabler/icons/user-plus.svg'),
|
user_approved: require('@tabler/icons/user-plus.svg'),
|
||||||
|
update: require('@tabler/icons/pencil.svg'),
|
||||||
};
|
};
|
||||||
|
|
||||||
const messages: Record<NotificationType, MessageDescriptor> = defineMessages({
|
const messages: Record<NotificationType, MessageDescriptor> = defineMessages({
|
||||||
|
@ -101,6 +102,10 @@ const messages: Record<NotificationType, MessageDescriptor> = defineMessages({
|
||||||
id: 'notification.user_approved',
|
id: 'notification.user_approved',
|
||||||
defaultMessage: 'Welcome to {instance}!',
|
defaultMessage: 'Welcome to {instance}!',
|
||||||
},
|
},
|
||||||
|
update: {
|
||||||
|
id: 'notification.update',
|
||||||
|
defaultMessage: '{name} edited a post',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const buildMessage = (
|
const buildMessage = (
|
||||||
|
@ -287,6 +292,7 @@ const Notification: React.FC<INotificaton> = (props) => {
|
||||||
case 'reblog':
|
case 'reblog':
|
||||||
case 'status':
|
case 'status':
|
||||||
case 'poll':
|
case 'poll':
|
||||||
|
case 'update':
|
||||||
case 'pleroma:emoji_reaction':
|
case 'pleroma:emoji_reaction':
|
||||||
return status && typeof status === 'object' ? (
|
return status && typeof status === 'object' ? (
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|
|
@ -11,6 +11,7 @@ const NOTIFICATION_TYPES = [
|
||||||
'pleroma:chat_mention',
|
'pleroma:chat_mention',
|
||||||
'pleroma:emoji_reaction',
|
'pleroma:emoji_reaction',
|
||||||
'user_approved',
|
'user_approved',
|
||||||
|
'update',
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
type NotificationType = typeof NOTIFICATION_TYPES[number];
|
type NotificationType = typeof NOTIFICATION_TYPES[number];
|
||||||
|
|
Ładowanie…
Reference in New Issue