mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-04-27 15:09:13 +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 />
|
<counter-icon icon="bell" :count="unreadNotificationsCount" danger />
|
||||||
</base-button>
|
</base-button>
|
||||||
</template>
|
</template>
|
||||||
<template #popover>
|
<template #popover="{ closeMenu }">
|
||||||
<div class="notifications-menu-popover">
|
<div class="notifications-menu-popover">
|
||||||
<notification-list :notifications="notifications" @markAsRead="markAsRead" />
|
<notification-list :notifications="notifications" @markAsRead="markAsRead" />
|
||||||
</div>
|
</div>
|
||||||
@ -25,7 +25,7 @@
|
|||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
</ds-flex-item>
|
</ds-flex-item>
|
||||||
<ds-flex-item :width="{ base: 'auto' }" centered>
|
<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') }}
|
{{ $t('notifications.markAllAsRead') }}
|
||||||
</ds-button>
|
</ds-button>
|
||||||
</ds-flex-item>
|
</ds-flex-item>
|
||||||
@ -74,11 +74,12 @@ export default {
|
|||||||
this.$toast.error(error.message)
|
this.$toast.error(error.message)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async markAllAsRead() {
|
async markAllAsRead(closeMenu) {
|
||||||
if (!this.hasNotifications) {
|
if (!this.hasNotifications) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
closeMenu()
|
||||||
try {
|
try {
|
||||||
await this.$apollo.mutate({
|
await this.$apollo.mutate({
|
||||||
mutation: markAllAsReadMutation(this.$i18n),
|
mutation: markAllAsReadMutation(this.$i18n),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user