From 37bf0f6ff9a4a2d54eaa578a0b793b6438d4eaac Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Thu, 31 Oct 2024 12:45:40 +0530 Subject: [PATCH] refactor: notifications panel code --- .../src/components/Layouts/AppSidebar.vue | 14 ++++----- .../src/components/Mobile/MobileSidebar.vue | 6 ++-- frontend/src/components/Notifications.vue | 31 +++++++++---------- frontend/src/pages/MobileNotification.vue | 17 +++++----- frontend/src/stores/notifications.js | 27 +++++++--------- 5 files changed, 42 insertions(+), 53 deletions(-) diff --git a/frontend/src/components/Layouts/AppSidebar.vue b/frontend/src/components/Layouts/AppSidebar.vue index 1c0a017a0..ada04c1dc 100644 --- a/frontend/src/components/Layouts/AppSidebar.vue +++ b/frontend/src/components/Layouts/AppSidebar.vue @@ -18,15 +18,12 @@ > @@ -112,7 +109,10 @@ import NotificationsIcon from '@/components/Icons/NotificationsIcon.vue' import SidebarLink from '@/components/SidebarLink.vue' import Notifications from '@/components/Notifications.vue' import { viewsStore } from '@/stores/views' -import { notificationsStore } from '@/stores/notifications' +import { + unreadNotificationsCount, + notificationsStore, +} from '@/stores/notifications' import { FeatherIcon } from 'frappe-ui' import { useStorage } from '@vueuse/core' import { computed, h } from 'vue' diff --git a/frontend/src/components/Mobile/MobileSidebar.vue b/frontend/src/components/Mobile/MobileSidebar.vue index bc06f5b6d..93f44b59e 100644 --- a/frontend/src/components/Mobile/MobileSidebar.vue +++ b/frontend/src/components/Mobile/MobileSidebar.vue @@ -25,8 +25,8 @@ > @@ -101,7 +101,7 @@ import PhoneIcon from '@/components/Icons/PhoneIcon.vue' import NotificationsIcon from '@/components/Icons/NotificationsIcon.vue' import SidebarLink from '@/components/SidebarLink.vue' import { viewsStore } from '@/stores/views' -import { notificationsStore } from '@/stores/notifications' +import { unreadNotificationsCount } from '@/stores/notifications' import { computed, h } from 'vue' import { mobileSidebarOpened as sidebarOpened } from '@/composables/settings' diff --git a/frontend/src/components/Notifications.vue b/frontend/src/components/Notifications.vue index 872e743b2..de456cdc3 100644 --- a/frontend/src/components/Notifications.vue +++ b/frontend/src/components/Notifications.vue @@ -1,6 +1,6 @@