From c792caf84fbbf0329bdfc8111c193698f561f972 Mon Sep 17 00:00:00 2001 From: Jeff Kristian Date: Tue, 16 Aug 2022 13:57:31 -0600 Subject: [PATCH] feat(notifications): notification basics (#4307) * feat(notification): wip on noti * feat(notifications): alerts show in notifications * feat(notifications): alerts show in notifications * feat(notifications: make notifications clickable rework notification structure) * feat(notifications: noti only missing delete) * fix(noti): hover pointer for alert * fix(noti): update * fix(noti): update * feat(noti): wip * fix(notification): update and rebase * fix(subscription): remove console * feat(notifications): notification basics * feat(notifications): notification basics * feat(notifications): notification basics --- .gitignore | 4 +- .../views/navigation/toolbar/Toolbar.html | 18 +- .../views/navigation/toolbar/Toolbar.less | 1 + .../views/navigation/toolbar/Toolbar.vue | 6 +- .../navigation/toolbar/alerts/Alerts.html | 16 +- .../navigation/toolbar/alerts/Alerts.vue | 21 +- .../toolbar/alerts/alert/Alert.html | 20 +- .../toolbar/alerts/alert/Alert.less | 1 + .../navigation/toolbar/alerts/alert/Alert.vue | 45 +- components/views/user/User.vue | 0 layouts/chat.vue | 0 libraries/Iridium/IridiumManager.ts | 6 + libraries/Iridium/NotificationManager.ts | 123 +++ libraries/Iridium/chat/ChatManager.ts | 20 + libraries/Iridium/friends/FriendsManager.ts | 18 + libraries/Iridium/notifications/types.ts | 46 +- libraries/ui/Alerts.ts | 35 - locales/en-US.js | 1 + store/ui/__snapshots__/getters.test.ts.snap | 32 - store/ui/getters.test.ts | 157 ---- store/ui/mutations.test.ts | 871 +----------------- store/ui/mutations.ts | 17 - utilities/Notifications.ts | 2 +- 23 files changed, 293 insertions(+), 1167 deletions(-) create mode 100644 components/views/user/User.vue create mode 100644 layouts/chat.vue create mode 100644 libraries/Iridium/NotificationManager.ts delete mode 100644 store/ui/__snapshots__/getters.test.ts.snap diff --git a/.gitignore b/.gitignore index 6003790c5e..7ef45bc2ed 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ yarn-debug.log* yarn-error.log* package-lock.json yarn.lock - +pnpm-lock.yaml # Runtime data pids *.pid @@ -103,4 +103,4 @@ scratchpad.js solana-localnet -iridium \ No newline at end of file +iridium diff --git a/components/views/navigation/toolbar/Toolbar.html b/components/views/navigation/toolbar/Toolbar.html index 6aaff9bbc7..d04089be9c 100644 --- a/components/views/navigation/toolbar/Toolbar.html +++ b/components/views/navigation/toolbar/Toolbar.html @@ -13,16 +13,20 @@
- {{ allUnseenNotifications.length }} + {{notifications.length}} + -
-
Object.entries(iridium.notifications?.state), ui: (state) => (state as RootState).ui, audio: (state) => (state as RootState).audio, video: (state) => (state as RootState).video, webrtc: (state) => (state as RootState).webrtc, modals: (state) => (state as RootState).ui.modals, }), - ...mapGetters('ui', ['allUnseenNotifications']), ModalWindows: () => ModalWindows, conversationId(): Conversation['id'] | undefined { return this.$route.params.id diff --git a/components/views/navigation/toolbar/alerts/Alerts.html b/components/views/navigation/toolbar/alerts/Alerts.html index 8316b4c267..611d6762ac 100644 --- a/components/views/navigation/toolbar/alerts/Alerts.html +++ b/components/views/navigation/toolbar/alerts/Alerts.html @@ -4,15 +4,17 @@
diff --git a/components/views/navigation/toolbar/alerts/Alerts.vue b/components/views/navigation/toolbar/alerts/Alerts.vue index d843772be6..b9e9ba617e 100644 --- a/components/views/navigation/toolbar/alerts/Alerts.vue +++ b/components/views/navigation/toolbar/alerts/Alerts.vue @@ -2,20 +2,29 @@