pleroma-fe/src/components/delete_button/delete_button.js
qwexvf 0a62341135
fix typeError in delete_button.js
not a big thing just fixes a typeError.
2018-03-20 22:33:43 +09:00

17 lines
532 B
JavaScript

const DeleteButton = {
props: [ 'status' ],
methods: {
deleteStatus () {
const confirmed = window.confirm('Do you really want to delete this status?')
if (confirmed) {
this.$store.dispatch('deleteStatus', { id: this.status.id })
}
}
},
computed: {
currentUser () { return this.$store.state.users.currentUser },
canDelete () { return this.currentUser && this.currentUser.rights.delete_others_notice || this.status.user.id === this.currentUser.id }
}
}
export default DeleteButton