add options for marking single notification as read
This commit is contained in:
parent
c059f4a7ee
commit
ec2937ec1f
11 changed files with 85 additions and 4 deletions
|
|
@ -50,6 +50,7 @@ const Notification = {
|
|||
}
|
||||
},
|
||||
props: ['notification'],
|
||||
emits: ['interacted'],
|
||||
components: {
|
||||
StatusContent,
|
||||
UserAvatar,
|
||||
|
|
@ -72,6 +73,9 @@ const Notification = {
|
|||
getUser (notification) {
|
||||
return this.$store.state.users.usersObject[notification.from_profile.id]
|
||||
},
|
||||
interacted () {
|
||||
this.$emit('interacted')
|
||||
},
|
||||
toggleMute () {
|
||||
this.unmuted = !this.unmuted
|
||||
},
|
||||
|
|
@ -95,6 +99,7 @@ const Notification = {
|
|||
}
|
||||
},
|
||||
doApprove () {
|
||||
this.$emit('interacted')
|
||||
this.$store.state.api.backendInteractor.approveUser({ id: this.user.id })
|
||||
this.$store.dispatch('removeFollowRequest', this.user)
|
||||
this.$store.dispatch('markSingleNotificationAsSeen', { id: this.notification.id })
|
||||
|
|
@ -114,6 +119,7 @@ const Notification = {
|
|||
}
|
||||
},
|
||||
doDeny () {
|
||||
this.$emit('interacted')
|
||||
this.$store.state.api.backendInteractor.denyUser({ id: this.user.id })
|
||||
.then(() => {
|
||||
this.$store.dispatch('dismissNotificationLocal', { id: this.notification.id })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue