diff --git a/ui/app/composables/useNotification.ts b/ui/app/composables/useNotification.ts index 1899cb6d..c1a06c23 100644 --- a/ui/app/composables/useNotification.ts +++ b/ui/app/composables/useNotification.ts @@ -3,7 +3,7 @@ import { POSITION, useToast } from "vue-toastification" export type notificationType = 'info' | 'success' | 'warning' | 'error' -export interface Notification { +export interface notification { id: string; message: string level: notificationType diff --git a/ui/app/stores/NotificationStore.ts b/ui/app/stores/NotificationStore.ts index 73c2e7dd..3a8bef71 100644 --- a/ui/app/stores/NotificationStore.ts +++ b/ui/app/stores/NotificationStore.ts @@ -1,9 +1,9 @@ import { defineStore } from 'pinia' import { useStorage } from '@vueuse/core' -import type { Notification, notificationType } from '~/composables/useNotification' +import type { notification, notificationType } from '~/composables/useNotification' export const useNotificationStore = defineStore('notifications', () => { - const notifications = useStorage('notifications', []) + const notifications = useStorage('notifications', []) const unreadCount = computed(() => notifications.value.filter(n => !n.seen).length) const add = (level: notificationType, message: string, seen: boolean = false): string => { @@ -39,7 +39,7 @@ export const useNotificationStore = defineStore('notifications', () => { n.seen = true } - const get = (id: string): Notification | undefined => notifications.value.find(n => n.id === id) + const get = (id: string): notification | undefined => notifications.value.find(n => n.id === id) const remove = (id: string) => notifications.value = notifications.value.filter(n => n.id !== id)