aboutsummaryrefslogtreecommitdiff
path: root/src/components/notifications
diff options
context:
space:
mode:
authordave <starpumadev@gmail.com>2019-03-12 17:16:57 -0400
committerdave <starpumadev@gmail.com>2019-03-12 17:16:57 -0400
commitcd9a7dd48802fff8942ae607a23677cfb43a7b14 (patch)
tree2b29ea2bf40515e08626251ac83c6df4ea9326cb /src/components/notifications
parentf397537642a6b8a4079d8d45d835ddd50f2d2b4a (diff)
#436: integrate mastoAPI notifications
Diffstat (limited to 'src/components/notifications')
-rw-r--r--src/components/notifications/notifications.js5
-rw-r--r--src/components/notifications/notifications.vue3
2 files changed, 6 insertions, 2 deletions
diff --git a/src/components/notifications/notifications.js b/src/components/notifications/notifications.js
index 9fc5e38a..68004d54 100644
--- a/src/components/notifications/notifications.js
+++ b/src/components/notifications/notifications.js
@@ -53,7 +53,10 @@ const Notifications = {
},
methods: {
markAsSeen () {
- this.$store.dispatch('markNotificationsAsSeen', this.visibleNotifications)
+ this.$store.dispatch('markNotificationsAsSeen')
+ },
+ clear () {
+ this.$store.dispatch('clearNotifications')
},
fetchOlderNotifications () {
const store = this.$store
diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue
index 6f162b62..6438361d 100644
--- a/src/components/notifications/notifications.vue
+++ b/src/components/notifications/notifications.vue
@@ -9,7 +9,8 @@
<div @click.prevent class="loadmore-error alert error" v-if="error">
{{$t('timeline.error_fetching')}}
</div>
- <button v-if="unseenCount" @click.prevent="markAsSeen" class="read-button">{{$t('notifications.read')}}</button>
+ <!-- <button v-if="unseenCount" @click.prevent="markAsSeen" class="read-button">{{$t('notifications.read')}}</button> -->
+ <button v-if="notifications.length" @click.prevent="clear" class="read-button">{{$t('notifications.clear')}}</button>
</div>
<div class="panel-body">
<div v-for="notification in visibleNotifications" :key="notification.action.id" class="notification" :class='{"unseen": !notification.seen}'>