From 4fc4b6b2c9a52572654b51bf94d6f794e97a0c41 Mon Sep 17 00:00:00 2001 From: AkiraFukushima Date: Wed, 24 Mar 2021 01:14:54 +0900 Subject: [PATCH 1/2] refs #2287 Add poll expired notification --- src/config/locales/en/translation.json | 4 + .../components/organisms/Notification.vue | 15 +- .../organisms/Notification/PollExpired.vue | 472 ++++++++++++++++++ .../organisms/Notification/PollVote.vue | 2 +- .../organisms/Notification/Status.vue | 60 ++- .../TimelineSpace/Contents/Notifications.ts | 1 + 6 files changed, 525 insertions(+), 29 deletions(-) create mode 100644 src/renderer/components/organisms/Notification/PollExpired.vue diff --git a/src/config/locales/en/translation.json b/src/config/locales/en/translation.json index 7d3cefe1..613e82cd 100644 --- a/src/config/locales/en/translation.json +++ b/src/config/locales/en/translation.json @@ -506,6 +506,10 @@ "poll_vote": { "title": "PollVote", "body": "{{username}} voted your poll" + }, + "poll_expired": { + "title": "PollExpired", + "body": "{{username}}'s poll is expired" } } } diff --git a/src/renderer/components/organisms/Notification.vue b/src/renderer/components/organisms/Notification.vue index 950d3986..6b1df3bf 100644 --- a/src/renderer/components/organisms/Notification.vue +++ b/src/renderer/components/organisms/Notification.vue @@ -108,6 +108,18 @@ @select="$emit('selectNotification')" > + + @@ -121,6 +133,7 @@ import Reblog from './Notification/Reblog' import Reaction from './Notification/Reaction' import Status from './Notification/Status' import PollVote from './Notification/PollVote' +import PollExpired from './Notification/PollExpired' export default { name: 'notification', @@ -142,7 +155,7 @@ export default { default: false } }, - components: { Favourite, Follow, FollowRequest, Mention, Quote, Reblog, Reaction, Status, PollVote }, + components: { Favourite, Follow, FollowRequest, Mention, Quote, Reblog, Reaction, Status, PollVote, PollExpired }, methods: { updateToot(message) { return this.$emit('update', message) diff --git a/src/renderer/components/organisms/Notification/PollExpired.vue b/src/renderer/components/organisms/Notification/PollExpired.vue new file mode 100644 index 00000000..b54a3fa5 --- /dev/null +++ b/src/renderer/components/organisms/Notification/PollExpired.vue @@ -0,0 +1,472 @@ + + + + + diff --git a/src/renderer/components/organisms/Notification/PollVote.vue b/src/renderer/components/organisms/Notification/PollVote.vue index 3979104e..d2079078 100644 --- a/src/renderer/components/organisms/Notification/PollVote.vue +++ b/src/renderer/components/organisms/Notification/PollVote.vue @@ -7,7 +7,7 @@ ref="status" @click="$emit('select')" role="article" - aria-label="polll vote" + aria-label="poll vote" >
Filtered
diff --git a/src/renderer/components/organisms/Notification/Status.vue b/src/renderer/components/organisms/Notification/Status.vue index 1c272a4a..ec300c84 100644 --- a/src/renderer/components/organisms/Notification/Status.vue +++ b/src/renderer/components/organisms/Notification/Status.vue @@ -26,11 +26,13 @@ @selectToot="$emit('select')" > +