mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
fix(webapp): close popover notification menu
This commit is contained in:
parent
8e58e1a395
commit
593b81c501
@ -12,7 +12,7 @@
|
||||
<counter-icon icon="bell" :count="unreadNotificationsCount" danger />
|
||||
</base-button>
|
||||
</template>
|
||||
<template #popover>
|
||||
<template #popover="{ closeMenu }">
|
||||
<div class="notifications-menu-popover">
|
||||
<notification-list :notifications="notifications" @markAsRead="markAsRead" />
|
||||
</div>
|
||||
@ -25,7 +25,7 @@
|
||||
</nuxt-link>
|
||||
</ds-flex-item>
|
||||
<ds-flex-item :width="{ base: 'auto' }" centered>
|
||||
<ds-button ghost primary @click="markAllAsRead" data-test="markAllAsRead-button">
|
||||
<ds-button ghost primary @click="markAllAsRead(closeMenu)" data-test="markAllAsRead-button">
|
||||
{{ $t('notifications.markAllAsRead') }}
|
||||
</ds-button>
|
||||
</ds-flex-item>
|
||||
@ -74,11 +74,12 @@ export default {
|
||||
this.$toast.error(error.message)
|
||||
}
|
||||
},
|
||||
async markAllAsRead() {
|
||||
async markAllAsRead(closeMenu) {
|
||||
if (!this.hasNotifications) {
|
||||
return
|
||||
}
|
||||
|
||||
closeMenu()
|
||||
try {
|
||||
await this.$apollo.mutate({
|
||||
mutation: markAllAsReadMutation(this.$i18n),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user