diff options
| author | Roger Braun <roger@rogerbraun.net> | 2017-03-09 10:33:21 +0100 |
|---|---|---|
| committer | Roger Braun <roger@rogerbraun.net> | 2017-03-09 10:33:21 +0100 |
| commit | 0eeccb87cef4d137710e3c7fd215b94e45aff3d1 (patch) | |
| tree | 584085071af589e58f79ffb67051c49b6bd883bb /src/components/retweet_button/retweet_button.js | |
| parent | 290180a987ecb4949fc877c512f3cff120bcbc70 (diff) | |
| parent | 64d71b75cfed41d82a99e3e478fc75d5f81f84bd (diff) | |
Merge branch 'develop' into feature/hash-routed
Diffstat (limited to 'src/components/retweet_button/retweet_button.js')
| -rw-r--r-- | src/components/retweet_button/retweet_button.js | 14 |
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 } } } |
