diff options
Diffstat (limited to 'src-vue/src/plugins/modules/notifications.ts')
-rw-r--r-- | src-vue/src/plugins/modules/notifications.ts | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src-vue/src/plugins/modules/notifications.ts b/src-vue/src/plugins/modules/notifications.ts deleted file mode 100644 index ed57f8af..00000000 --- a/src-vue/src/plugins/modules/notifications.ts +++ /dev/null @@ -1,31 +0,0 @@ -type NotificationType = 'success' | 'warning' | 'info' | 'error'; - -export interface Notification { - title: string; - text: string; - type: NotificationType; -} - -interface NotificationsStoreState { - notifications: Notification[]; -} - - -/** - * This notification module is meant to host the list of notifications that have been fired while the application was - * not focused. - * This list is then used by the [NotificationButton] component to display notifications to user. - **/ -export const notificationsModule = { - state: () => ({ - notifications: [] - }) as NotificationsStoreState, - mutations: { - addNotification(state: NotificationsStoreState, payload: Notification) { - state.notifications.push(payload); - }, - removeNotification(state: NotificationsStoreState, index: number): void { - state.notifications.splice(index, 1); - } - } - } |