feat(#36): Notification rework with single and all comments mark as read
This commit is contained in:
@@ -36,6 +36,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useNotificationStore } from '~~/stores/useNotificationStore'
|
||||
|
||||
const { t: $t } = useI18n()
|
||||
|
||||
const links = [
|
||||
@@ -60,16 +62,17 @@ const open = ref(false)
|
||||
const logger = useLogger().withTag('layout')
|
||||
|
||||
const isNotificationsSlideoverOpen = ref(false)
|
||||
const { unreadCount, fetchUnreadCount, startPeriodicRefresh } = useNotification()
|
||||
const notificationStore = useNotificationStore()
|
||||
const { hasUnread } = storeToRefs(notificationStore)
|
||||
|
||||
onMounted(async () => {
|
||||
await fetchUnreadCount()
|
||||
startPeriodicRefresh()
|
||||
await notificationStore.fetchUnreadCount()
|
||||
notificationStore.startPeriodicRefresh()
|
||||
})
|
||||
|
||||
provide('notificationState', {
|
||||
isNotificationsSlideoverOpen,
|
||||
unreadCount
|
||||
hasUnread
|
||||
})
|
||||
|
||||
async function copyAccessTokenToClipboard() {
|
||||
|
||||
Reference in New Issue
Block a user