From 664a55fc792bbaf5e3b474a610fee53febaa7ebd Mon Sep 17 00:00:00 2001
From: eal <eal@waifu.club>
Date: Fri, 2 Feb 2018 00:45:29 +0200
Subject: Show fav/RT counts even if not logged in.

---
 src/components/favorite_button/favorite_button.vue | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

(limited to 'src/components/favorite_button/favorite_button.vue')

diff --git a/src/components/favorite_button/favorite_button.vue b/src/components/favorite_button/favorite_button.vue
index dcf28e35..65d368c7 100644
--- a/src/components/favorite_button/favorite_button.vue
+++ b/src/components/favorite_button/favorite_button.vue
@@ -1,6 +1,10 @@
 <template>
-  <div>
-    <i :class='classes' class='favorite-button base09' @click.prevent='favorite()'/>
+  <div v-if="loggedIn">
+    <i :class='classes' class='favorite-button fav-active base09' @click.prevent='favorite()'/>
+    <span v-if='status.fave_num > 0'>{{status.fave_num}}</span>
+  </div>
+  <div v-else>
+    <i :class='classes' class='favorite-button base09'/>
     <span v-if='status.fave_num > 0'>{{status.fave_num}}</span>
   </div>
 </template>
@@ -8,7 +12,7 @@
 <script src="./favorite_button.js" ></script>
 
 <style lang='scss'>
-  .favorite-button {
+  .fav-active {
       cursor: pointer;
       animation-duration: 0.6s;
       &:hover {
-- 
cgit v1.2.3-70-g09d2

