From f441de806fdbf100b5874dfb7791e56d96083c34 Mon Sep 17 00:00:00 2001 From: Natty Date: Thu, 18 Jan 2024 03:26:26 +0100 Subject: [PATCH] Frontend: Basic notification receiving via SSE --- ...MkNotification.vue => MagNotification.vue} | 0 ...tionToast.vue => MagNotificationToast.vue} | 2 +- ...Notifications.vue => MagNotifications.vue} | 16 +- fe_calckey/frontend/client/src/config.ts | 1 + .../client/src/pages/notifications.vue | 2 +- fe_calckey/frontend/client/src/stream.ts | 7 +- .../client/src/ui/_common_/common.vue | 12 +- .../src/ui/deck/notifications-column.vue | 4 +- .../client/src/widgets/notifications.vue | 10 +- .../frontend/magnetar-common/package.json | 3 + .../frontend/magnetar-common/src/index.ts | 12 +- .../magnetar-common/src/sse-listener.ts | 142 ++++++++++++++++++ .../frontend/magnetar-common/src/types.ts | 1 + .../magnetar-common/src/types/ChannelEvent.ts | 4 + fe_calckey/frontend/pnpm-lock.yaml | 8 + src/api_v1/streaming.rs | 43 ++++-- 16 files changed, 225 insertions(+), 42 deletions(-) rename fe_calckey/frontend/client/src/components/{MkNotification.vue => MagNotification.vue} (100%) rename fe_calckey/frontend/client/src/components/{MkNotificationToast.vue => MagNotificationToast.vue} (96%) rename fe_calckey/frontend/client/src/components/{MkNotifications.vue => MagNotifications.vue} (90%) create mode 100644 fe_calckey/frontend/magnetar-common/src/sse-listener.ts create mode 100644 fe_calckey/frontend/magnetar-common/src/types/ChannelEvent.ts diff --git a/fe_calckey/frontend/client/src/components/MkNotification.vue b/fe_calckey/frontend/client/src/components/MagNotification.vue similarity index 100% rename from fe_calckey/frontend/client/src/components/MkNotification.vue rename to fe_calckey/frontend/client/src/components/MagNotification.vue diff --git a/fe_calckey/frontend/client/src/components/MkNotificationToast.vue b/fe_calckey/frontend/client/src/components/MagNotificationToast.vue similarity index 96% rename from fe_calckey/frontend/client/src/components/MkNotificationToast.vue rename to fe_calckey/frontend/client/src/components/MagNotificationToast.vue index 8fbefbd..15c1ffa 100644 --- a/fe_calckey/frontend/client/src/components/MkNotificationToast.vue +++ b/fe_calckey/frontend/client/src/components/MagNotificationToast.vue @@ -16,7 +16,7 @@