Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/feature/threads-and-more' into n…
Browse files Browse the repository at this point in the history
…ew-authentication
  • Loading branch information
Geometrically committed Jul 14, 2023
2 parents c13c1f3 + 34660ad commit e585edc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/ui/NotificationItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
<div
v-for="notif in notification.grouped_notifs
? [notification, ...notification.grouped_notifs]
: notification"
: [notification]"
:key="notif.id"
class="version-link"
>
Expand Down
11 changes: 10 additions & 1 deletion pages/dashboard/notifications.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
</div>
<template v-if="notifications.length > 0">
<Chips
v-if="notifTypes.length > 1"
v-model="selectedType"
:items="notifTypes"
:format-label="
Expand Down Expand Up @@ -67,7 +68,15 @@ const notifTypes = computed(() => {
if (allNotifs.value === null) {
return []
}
const types = [...new Set(allNotifs.value.map((notif) => notif.type))]
const types = [
...new Set(
allNotifs.value
.filter((notification) => {
return history.value || !notification.read
})
.map((notif) => notif.type)
),
]
return types.length > 1 ? ['all', ...types] : types
})
Expand Down

0 comments on commit e585edc

Please sign in to comment.