Add report button to status ellipsis menu

This commit is contained in:
Shpuld Shpuldson 2021-01-12 14:43:21 +02:00
parent 3e7d1fbf23
commit 65dbf7b85d
7 changed files with 34 additions and 9 deletions

View file

@ -9,7 +9,8 @@ import {
faExternalLinkAlt
} from '@fortawesome/free-solid-svg-icons'
import {
faBookmark as faBookmarkReg
faBookmark as faBookmarkReg,
faFlag
} from '@fortawesome/free-regular-svg-icons'
library.add(
@ -19,7 +20,8 @@ library.add(
faEyeSlash,
faThumbtack,
faShareAlt,
faExternalLinkAlt
faExternalLinkAlt,
faFlag
)
const ExtraButtons = {
@ -66,6 +68,9 @@ const ExtraButtons = {
this.$store.dispatch('unbookmark', { id: this.status.id })
.then(() => this.$emit('onSuccess'))
.catch(err => this.$emit('onError', err.error.error))
},
reportStatus () {
this.$store.dispatch('openUserReportingModal', { userId: this.status.user.id, statusIds: [this.status.id] })
}
},
computed: {