aboutsummaryrefslogtreecommitdiff
path: root/src/components/retweet_button/retweet_button.js
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-03-09 09:19:40 +0100
committerRoger Braun <roger@rogerbraun.net>2017-03-09 09:19:40 +0100
commit2f52669380703030aa8e197deb05240c5f3bf979 (patch)
tree5b40b0d4efd3d132c8bdd321092ce2bd5fb8a0e6 /src/components/retweet_button/retweet_button.js
parentc921662036fe39f5146d5a36b4b018af3cfc2635 (diff)
parent64d71b75cfed41d82a99e3e478fc75d5f81f84bd (diff)
Merge branch 'develop' into wakarimasen/pleroma-fe-develop
Diffstat (limited to 'src/components/retweet_button/retweet_button.js')
-rw-r--r--src/components/retweet_button/retweet_button.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/components/retweet_button/retweet_button.js b/src/components/retweet_button/retweet_button.js
index e7318dc5..2280f315 100644
--- a/src/components/retweet_button/retweet_button.js
+++ b/src/components/retweet_button/retweet_button.js
@@ -1,16 +1,26 @@
const RetweetButton = {
- props: [ 'status' ],
+ props: ['status'],
+ data () {
+ return {
+ animated: false
+ }
+ },
methods: {
retweet () {
if (!this.status.repeated) {
this.$store.dispatch('retweet', {id: this.status.id})
}
+ this.animated = true
+ setTimeout(() => {
+ this.animated = false
+ }, 500)
}
},
computed: {
classes () {
return {
- 'retweeted': this.status.repeated
+ 'retweeted': this.status.repeated,
+ 'animate-spin': this.animated
}
}
}