From a2a58a3eadd1474523c1b468e4282fd54627669c Mon Sep 17 00:00:00 2001 From: AkiraFukushima Date: Tue, 2 Mar 2021 10:59:41 +0900 Subject: [PATCH] refs #2088 Display status notification in notifications --- src/config/locales/en/translation.json | 4 + .../components/organisms/Notification.vue | 15 ++- .../organisms/Notification/Favourite.vue | 4 +- .../organisms/Notification/Status.vue | 122 ++++++++++++++++++ .../TimelineSpace/Contents/Notifications.ts | 2 +- 5 files changed, 142 insertions(+), 5 deletions(-) create mode 100644 src/renderer/components/organisms/Notification/Status.vue diff --git a/src/config/locales/en/translation.json b/src/config/locales/en/translation.json index 0f844e2e..70e53701 100644 --- a/src/config/locales/en/translation.json +++ b/src/config/locales/en/translation.json @@ -491,6 +491,10 @@ "reaction": { "title": "Reaction", "body": "{{username}} reacted your status" + }, + "status": { + "title": "Status", + "body": "{{username}} just posted" } } } diff --git a/src/renderer/components/organisms/Notification.vue b/src/renderer/components/organisms/Notification.vue index 56736ab7..62eb43f6 100644 --- a/src/renderer/components/organisms/Notification.vue +++ b/src/renderer/components/organisms/Notification.vue @@ -84,6 +84,18 @@ @select="$emit('selectNotification')" > + + @@ -95,6 +107,7 @@ import Mention from './Notification/Mention' import Quote from './Notification/Quote' import Reblog from './Notification/Reblog' import Reaction from './Notification/Reaction' +import Status from './Notification/Status' export default { name: 'notification', @@ -116,7 +129,7 @@ export default { default: false } }, - components: { Favourite, Follow, FollowRequest, Mention, Quote, Reblog, Reaction }, + components: { Favourite, Follow, FollowRequest, Mention, Quote, Reblog, Reaction, Status }, methods: { updateToot(message) { return this.$emit('update', message) diff --git a/src/renderer/components/organisms/Notification/Favourite.vue b/src/renderer/components/organisms/Notification/Favourite.vue index e12536aa..14c558c1 100644 --- a/src/renderer/components/organisms/Notification/Favourite.vue +++ b/src/renderer/components/organisms/Notification/Favourite.vue @@ -9,9 +9,7 @@ role="article" aria-label="favourited toot" > -
- Filtered -
+
Filtered
diff --git a/src/renderer/components/organisms/Notification/Status.vue b/src/renderer/components/organisms/Notification/Status.vue new file mode 100644 index 00000000..1c272a4a --- /dev/null +++ b/src/renderer/components/organisms/Notification/Status.vue @@ -0,0 +1,122 @@ + + + + + diff --git a/src/renderer/store/TimelineSpace/Contents/Notifications.ts b/src/renderer/store/TimelineSpace/Contents/Notifications.ts index 1736c497..80d1aec9 100644 --- a/src/renderer/store/TimelineSpace/Contents/Notifications.ts +++ b/src/renderer/store/TimelineSpace/Contents/Notifications.ts @@ -152,9 +152,9 @@ const getters: GetterTree = { case NotificationType.Favourite: case NotificationType.Reblog: case NotificationType.Mention: - case NotificationType.Poll: case NotificationType.EmojiReaction: case NotificationType.FollowRequest: + case NotificationType.Status: return true default: return false