From c574c58ad556dd8226fc84ddf656b603cb51dacf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?=
Date: Fri, 3 Apr 2020 09:26:18 +0200
Subject: [PATCH] Refactor notifications menu
---
.../components/Notification/Notification.vue | 110 +-----------------
webapp/components/utils/Notifications.js | 4 +-
2 files changed, 4 insertions(+), 110 deletions(-)
diff --git a/webapp/components/Notification/Notification.vue b/webapp/components/Notification/Notification.vue
index 0917cb72b..08a5741da 100644
--- a/webapp/components/Notification/Notification.vue
+++ b/webapp/components/Notification/Notification.vue
@@ -1,74 +1,4 @@
-
-
@@ -87,21 +17,10 @@
-
- {{ (notificationData.isPost || notificationData.isComment) && notificationData.title }}
+
+ {{ notificationData.title }}
-
-
- {{ notificationData.contentExcerpt | removeHtml }}
-
-
-
+
@@ -164,16 +78,6 @@ export default {
diff --git a/webapp/components/utils/Notifications.js b/webapp/components/utils/Notifications.js
index f56674579..99d83d573 100644
--- a/webapp/components/utils/Notifications.js
+++ b/webapp/components/utils/Notifications.js
@@ -60,7 +60,6 @@ export const testNotifications = [
export const extractNotificationDataOfCurrentUser = (notification, currentUser) => {
const from = notification.from // for readability
- // Wolle console.log('from: ', from)
let user = null
let post = null
let comment = null
@@ -73,7 +72,7 @@ export const extractNotificationDataOfCurrentUser = (notification, currentUser)
let reasonTranslationExtention = ''
let iconName, iconTooltip, triggerer, title, author, linkName, linkParams, linkHashParam
- // extract data out of the deep structure of db response
+ // extract flattened data out of the deep structure of db response
// leave undefined data as default, see above. so later by priority user, comment, post we get easely a clou what it is
switch (from.__typename) {
@@ -169,6 +168,5 @@ export const extractNotificationDataOfCurrentUser = (notification, currentUser)
reasonTranslationExtention,
linkTo: { name: linkName, params: linkParams, ...linkHashParam },
}
- // Wolle console.log('data: ', data)
return data
}