akkoma-fe/src/components/retweet_button/retweet_button.js

20 lines
331 B
JavaScript
Raw Normal View History

const RetweetButton = {
props: [ 'status' ],
methods: {
retweet () {
2016-11-13 16:09:16 +00:00
if (!this.status.repeated) {
this.$store.dispatch('retweet', {id: this.status.id})
}
}
},
computed: {
classes () {
return {
'retweeted': this.status.repeated
}
}
}
}
export default RetweetButton