From bee77ffdb284601720b9a13a19ca029af258d617 Mon Sep 17 00:00:00 2001
From: Shpuld Shpuldson <shp@cock.li>
Date: Thu, 26 Nov 2020 18:23:53 +0200
Subject: fix retweet event handler, fix text being selectable for status
 action counters

---
 src/components/retweet_button/retweet_button.vue | 34 +++++++++++++++++-------
 1 file changed, 24 insertions(+), 10 deletions(-)

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

diff --git a/src/components/retweet_button/retweet_button.vue b/src/components/retweet_button/retweet_button.vue
index 5d4915aa..2a7301ce 100644
--- a/src/components/retweet_button/retweet_button.vue
+++ b/src/components/retweet_button/retweet_button.vue
@@ -1,33 +1,36 @@
 <template>
-  <div>
+  <div class="RetweetButton">
     <button
       v-if="visibility !== 'private' && visibility !== 'direct' && loggedIn"
-      class="button-unstyled -padded RetweetButton -interactive"
+      class="button-unstyled interactive"
       :class="status.repeated && '-repeated'"
+      :title="$t('tool_tip.repeat')"
+      @click.prevent="retweet()"
     >
       <FAIcon
         class="fa-scale-110 fa-old-padding"
         icon="retweet"
         :spin="animated"
-        :title="$t('tool_tip.repeat')"
-        @click.prevent="retweet()"
       />
     </button>
     <FAIcon
       v-else-if="loggedIn"
-      :class="classes"
-      class="RetweetButton fa-scale-110 fa-old-padding"
+      class="fa-scale-110 fa-old-padding"
       icon="lock"
       :title="$t('timeline.no_retweet_hint')"
     />
     <FAIcon
       v-else
-      :class="classes"
-      class="RetweetButton fa-scale-110 fa-old-padding"
+      class="fa-scale-110 fa-old-padding"
       icon="retweet"
       :title="$t('tool_tip.repeat')"
     />
-    <span v-if="!mergedConfig.hidePostStats && status.repeat_num > 0">{{ status.repeat_num }}</span>
+    <span
+      v-if="!mergedConfig.hidePostStats && status.repeat_num > 0"
+      class="no-event"
+    >
+      {{ status.repeat_num }}
+    </span>
   </div>
 </template>
 
@@ -37,8 +40,19 @@
 @import '../../_variables.scss';
 
 .RetweetButton {
-  &.-interactive {
+  display: flex;
+
+  > :first-child {
+    padding: 10px;
+    margin: -10px -5px -10px -10px;
+  }
+
+  .action-counter {
+    pointer-events: none;
+    user-select: none;
+  }
 
+  .interactive {
     .svg-inline--fa {
       animation-duration: 0.6s;
     }
-- 
cgit v1.2.3-70-g09d2

