From 5ad4d043e7514a26a395cf72215a74362c4ca2e0 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Wed, 31 May 2017 11:47:18 +0300 Subject: [PATCH] Enable reply/rt/fav for mention notifications by using a barebones status in place of plain notification content. --- src/components/notifications/notifications.js | 5 +++++ .../notifications/notifications.scss | 4 ++-- .../notifications/notifications.vue | 20 +++++++++---------- src/components/status/status.js | 3 ++- src/components/status/status.vue | 17 +++++++++++++++- 5 files changed, 35 insertions(+), 14 deletions(-) diff --git a/src/components/notifications/notifications.js b/src/components/notifications/notifications.js index c8d5e212..c0c86c68 100644 --- a/src/components/notifications/notifications.js +++ b/src/components/notifications/notifications.js @@ -1,3 +1,5 @@ +import Status from '../status/status.vue' + import { sortBy, take, filter } from 'lodash' const Notifications = { @@ -23,6 +25,9 @@ const Notifications = { return this.unseenNotifications.length } }, + components: { + Status + }, watch: { unseenCount (count) { if (count > 0) { diff --git a/src/components/notifications/notifications.scss b/src/components/notifications/notifications.scss index 5619c2d8..f02ced8d 100644 --- a/src/components/notifications/notifications.scss +++ b/src/components/notifications/notifications.scss @@ -45,11 +45,11 @@ word-wrap: break-word; line-height:18px; - .icon-retweet { + .icon-retweet.lit { color: $green; } - .icon-reply { + .icon-reply.lit { color: $blue; } diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue index 9d9028ad..256d6f7a 100644 --- a/src/components/notifications/notifications.vue +++ b/src/components/notifications/notifications.vue @@ -11,30 +11,30 @@ -
+

{{ notification.action.user.name }}

-

{{ notification.status.text }}

+

{{ notification.action.user.name }} - +

-

{{ notification.status.text }}

+
-

- {{ notification.action.user.name }} - - -

-

{{ notification.status.text }}

+

+ {{ notification.action.user.name }} + + +

+
diff --git a/src/components/status/status.js b/src/components/status/status.js index 5e7bde53..183838a8 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -12,7 +12,8 @@ const Status = { 'expandable', 'inConversation', 'focused', - 'highlight' + 'highlight', + 'compact' ], data: () => ({ replying: false, diff --git a/src/components/status/status.vue b/src/components/status/status.vue index db33a200..e06fc29a 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -1,5 +1,20 @@