diff --git a/client/src/components/CshrToolbar.vue b/client/src/components/CshrToolbar.vue
index c202f1c6..500e227a 100644
--- a/client/src/components/CshrToolbar.vue
+++ b/client/src/components/CshrToolbar.vue
@@ -1,22 +1,46 @@
+
-
+
-
+
-
+
mdi-read
Mark all as read
-
+
mdi-trash-can
Delete all notifications
@@ -32,8 +56,11 @@
-
+
{{ notification.title }}
@@ -54,18 +81,36 @@
-
-
+
+
-
+
@@ -83,6 +128,12 @@ import { ApiClientBase } from '@/clients/api/base'
export default {
name: 'CshrToolbar',
components: { NotificationDetailsDialog, profileImage },
+ props: {
+ isMobile: {
+ type: Boolean,
+ default: false
+ }
+ },
setup(_, { emit }) {
const $api = useApi()
const user = useAsyncState(async () => await $api.myprofile.getUser(), null)
@@ -94,14 +145,14 @@ export default {
const notifications = computed(() => notificationStore.notifications)
onMounted(async () => {
- await user.execute();
+ await user.execute()
if (user.state.value) {
await loadNotifications()
}
if (!user.state.value) {
emit('logout')
}
- });
+ })
const loadNotifications = async () => {
const notificationData = await $api.notifications.list()
@@ -109,7 +160,6 @@ export default {
isLoading.value = false
}
-
function formatedDate(date: string) {
const _date = new Date(date)
const _formatDate = formatDate(date)
@@ -119,7 +169,6 @@ export default {
const selectedNotification = ref() as Ref
-
const setNotification = async (notification: notificationType) => {
selectedNotification.value = notification
if (!selectedNotification.value.is_read) {
@@ -184,7 +233,8 @@ export default {
handleDeleteAllNotifications,
menu
}
- }
+ },
+ emits: ['logout', 'toggle-drawer']
}
diff --git a/client/src/components/SideDrawer.vue b/client/src/components/SideDrawer.vue
index 02061547..27712516 100644
--- a/client/src/components/SideDrawer.vue
+++ b/client/src/components/SideDrawer.vue
@@ -1,14 +1,24 @@
-