diff --git a/src/intl/en-US.js b/src/intl/en-US.js index c12ef9f8..88de2b78 100644 --- a/src/intl/en-US.js +++ b/src/intl/en-US.js @@ -498,6 +498,7 @@ export default { accountFollowedYou: '{name} followed you, {account}', accountSignedUp: '{name} signed up, {account}', accountRequestedFollow: '{name} requested to follow you, {account}', + accountReported: '{name} filed a report, {account}', reblogCountsHidden: 'Boost counts hidden', favoriteCountsHidden: 'Favorite counts hidden', rebloggedTimes: `Boosted {count, plural, @@ -514,6 +515,7 @@ export default { followedYou: 'followed you', edited: 'edited their toot', requestedFollow: 'requested to follow you', + reported: 'filed a report', signedUp: 'signed up', posted: 'posted', pollYouCreatedEnded: 'A poll you created has ended', diff --git a/src/routes/_api/timelines.js b/src/routes/_api/timelines.js index a91cc74e..e4588d88 100644 --- a/src/routes/_api/timelines.js +++ b/src/routes/_api/timelines.js @@ -66,7 +66,7 @@ export async function getTimeline (instanceName, accessToken, timeline, maxId, s } if (timeline === 'notifications/mentions') { - params.exclude_types = ['follow', 'favourite', 'reblog', 'poll', 'admin.sign_up', 'update', 'follow_request'] + params.exclude_types = ['follow', 'favourite', 'reblog', 'poll', 'admin.sign_up', 'update', 'follow_request', 'admin.report'] } url += '?' + paramsString(params) diff --git a/src/routes/_components/status/Notification.html b/src/routes/_components/status/Notification.html index dbcdf0fb..78898743 100644 --- a/src/routes/_components/status/Notification.html +++ b/src/routes/_components/status/Notification.html @@ -78,6 +78,8 @@ return formatIntl('intl.accountSignedUp', params) } else if (notificationType === 'follow_request') { return formatIntl('intl.accountRequestedFollow', params) + } else if (notificationType === 'admin.report') { + return formatIntl('intl.accountReported', params) } else { // 'follow' return formatIntl('intl.accountFollowedYou', params) } diff --git a/src/routes/_components/status/StatusHeader.html b/src/routes/_components/status/StatusHeader.html index 59f3393f..9c1e4632 100644 --- a/src/routes/_components/status/StatusHeader.html +++ b/src/routes/_components/status/StatusHeader.html @@ -141,6 +141,8 @@ return '#fa-pencil' } else if (notificationType === 'follow_request') { return '#fa-hourglass' + } else if (notificationType === 'admin.report') { + return '#fa-flag' } return '#fa-star' }, @@ -167,6 +169,8 @@ return 'intl.edited' } else if (notificationType === 'follow_request') { return 'intl.requestedFollow' + } else if (notificationType === 'admin.report') { + return 'intl.reported' } else { return '' } diff --git a/src/service-worker.js b/src/service-worker.js index be26f0f7..b170eada 100644 --- a/src/service-worker.js +++ b/src/service-worker.js @@ -216,6 +216,7 @@ async function showRichNotification (data, notification) { switch (notification.type) { case 'follow': case 'follow_request': + case 'admin.report': case 'admin.sign_up': { await self.registration.showNotification(data.title, { badge,