diff options
| author | Tusooa Zhu <tusooa@kazv.moe> | 2022-05-20 12:39:46 -0400 |
|---|---|---|
| committer | Tusooa Zhu <tusooa@kazv.moe> | 2022-05-20 16:45:33 -0400 |
| commit | df487e3980f7128fa366ea25e99bed17af114d52 (patch) | |
| tree | 43b84a1d73ca51f82c22a0f1ba22bcf4711bfd9f | |
| parent | c93adf2e9a8ac6bfbe1e6cebde1d189475b3cb58 (diff) | |
Show poll-end notifications
Ref: poll-notif
| -rw-r--r-- | src/components/notification/notification.vue | 8 | ||||
| -rw-r--r-- | src/services/notification_utils/notification_utils.js | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue index 9ecb034f..7d3d0c69 100644 --- a/src/components/notification/notification.vue +++ b/src/components/notification/notification.vue @@ -120,6 +120,14 @@ </i18n-t> </small> </span> + <span v-if="notification.type === 'poll'"> + <FAIcon + class="type-icon" + icon="poll-h" + /> + {{ ' ' }} + <small>{{ $t('notifications.poll_ended') }}</small> + </span> </div> <div v-if="isStatusNotification" diff --git a/src/services/notification_utils/notification_utils.js b/src/services/notification_utils/notification_utils.js index 6fef1022..8a05f77b 100644 --- a/src/services/notification_utils/notification_utils.js +++ b/src/services/notification_utils/notification_utils.js @@ -14,11 +14,12 @@ export const visibleTypes = store => { rootState.config.notificationVisibility.follows && 'follow', rootState.config.notificationVisibility.followRequest && 'follow_request', rootState.config.notificationVisibility.moves && 'move', - rootState.config.notificationVisibility.emojiReactions && 'pleroma:emoji_reaction' + rootState.config.notificationVisibility.emojiReactions && 'pleroma:emoji_reaction', + 'poll' ].filter(_ => _)) } -const statusNotifications = ['like', 'mention', 'repeat', 'pleroma:emoji_reaction'] +const statusNotifications = ['like', 'mention', 'repeat', 'pleroma:emoji_reaction', 'poll'] export const isStatusNotification = (type) => includes(statusNotifications, type) @@ -98,6 +99,9 @@ export const prepareNotificationObject = (notification, i18n) => { case 'follow_request': i18nString = 'follow_request' break + case 'poll': + i18nString = 'poll_ended' + break } if (notification.type === 'pleroma:emoji_reaction') { |
