aboutsummaryrefslogtreecommitdiff
path: root/src/components/favorite_button
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2019-04-07 20:33:11 +0300
committerHenry Jameson <me@hjkos.com>2019-04-07 20:33:11 +0300
commit9108737d55300d8a4f822ba94335d8b53f04854d (patch)
tree76c51864a8f84edf260f2cf2fcf7625799f2533f /src/components/favorite_button
parent8c7f765dff8b66ff27aeeab5bc09cd715ab328a9 (diff)
Webpack 4, ESLint with Vue, Node-sass, updated dependencies overall. New linting.
Diffstat (limited to 'src/components/favorite_button')
-rw-r--r--src/components/favorite_button/favorite_button.js4
-rw-r--r--src/components/favorite_button/favorite_button.vue17
2 files changed, 15 insertions, 6 deletions
diff --git a/src/components/favorite_button/favorite_button.js b/src/components/favorite_button/favorite_button.js
index a2b4cb65..a24eacbf 100644
--- a/src/components/favorite_button/favorite_button.js
+++ b/src/components/favorite_button/favorite_button.js
@@ -11,9 +11,9 @@ const FavoriteButton = {
methods: {
favorite () {
if (!this.status.favorited) {
- this.$store.dispatch('favorite', {id: this.status.id})
+ this.$store.dispatch('favorite', { id: this.status.id })
} else {
- this.$store.dispatch('unfavorite', {id: this.status.id})
+ this.$store.dispatch('unfavorite', { id: this.status.id })
}
this.animated = true
setTimeout(() => {
diff --git a/src/components/favorite_button/favorite_button.vue b/src/components/favorite_button/favorite_button.vue
index 05ce6bd0..06ce9983 100644
--- a/src/components/favorite_button/favorite_button.vue
+++ b/src/components/favorite_button/favorite_button.vue
@@ -1,11 +1,20 @@
<template>
<div v-if="loggedIn">
- <i :class='classes' class='button-icon favorite-button fav-active' @click.prevent='favorite()' :title="$t('tool_tip.favorite')"/>
- <span v-if='!hidePostStatsLocal && status.fave_num > 0'>{{status.fave_num}}</span>
+ <i
+ :class="classes"
+ class="button-icon favorite-button fav-active"
+ :title="$t('tool_tip.favorite')"
+ @click.prevent="favorite()"
+ />
+ <span v-if="!hidePostStatsLocal && status.fave_num > 0">{{ status.fave_num }}</span>
</div>
<div v-else>
- <i :class='classes' class='button-icon favorite-button' :title="$t('tool_tip.favorite')"/>
- <span v-if='!hidePostStatsLocal && status.fave_num > 0'>{{status.fave_num}}</span>
+ <i
+ :class="classes"
+ class="button-icon favorite-button"
+ :title="$t('tool_tip.favorite')"
+ />
+ <span v-if="!hidePostStatsLocal && status.fave_num > 0">{{ status.fave_num }}</span>
</div>
</template>