From 59ade4084e2d3c7d018fec57972742a628749032 Mon Sep 17 00:00:00 2001
From: shpuld <shp@cock.li>
Date: Tue, 9 Jul 2019 16:50:23 +0300
Subject: Hide favs/rts properly when hide post stats is enabled

---
 src/components/status/status.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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

diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index 30969256..b825d17d 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -344,7 +344,7 @@
 
           <transition name="fade">
             <div
-              v-if="isFocused && combinedFavsAndRepeatsUsers.length > 0"
+              v-if="!hidePostStats && isFocused && combinedFavsAndRepeatsUsers.length > 0"
               class="favs-repeated-users"
             >
               <div class="stats">
-- 
cgit v1.2.3-70-g09d2


From 005815c8259e3ccbc1fdd9c4d352aa4053d187c4 Mon Sep 17 00:00:00 2001
From: taehoon <th.dev91@gmail.com>
Date: Thu, 11 Jul 2019 08:31:02 -0400
Subject: rewrite ExtraButtons using v-tooltip

---
 src/components/extra_buttons/extra_buttons.js  | 24 ------------------
 src/components/extra_buttons/extra_buttons.vue | 35 +++++++++-----------------
 src/components/status/status.vue               |  2 +-
 3 files changed, 13 insertions(+), 48 deletions(-)

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

diff --git a/src/components/extra_buttons/extra_buttons.js b/src/components/extra_buttons/extra_buttons.js
index 528da301..2ec72729 100644
--- a/src/components/extra_buttons/extra_buttons.js
+++ b/src/components/extra_buttons/extra_buttons.js
@@ -1,45 +1,21 @@
-import Popper from 'vue-popperjs/src/component/popper.js.vue'
-
 const ExtraButtons = {
   props: [ 'status' ],
-  components: {
-    Popper
-  },
-  data () {
-    return {
-      showDropDown: false,
-      showPopper: true
-    }
-  },
   methods: {
     deleteStatus () {
-      this.refreshPopper()
       const confirmed = window.confirm(this.$t('status.delete_confirm'))
       if (confirmed) {
         this.$store.dispatch('deleteStatus', { id: this.status.id })
       }
     },
-    toggleMenu () {
-      this.showDropDown = !this.showDropDown
-    },
     pinStatus () {
-      this.refreshPopper()
       this.$store.dispatch('pinStatus', this.status.id)
         .then(() => this.$emit('onSuccess'))
         .catch(err => this.$emit('onError', err.error.error))
     },
     unpinStatus () {
-      this.refreshPopper()
       this.$store.dispatch('unpinStatus', this.status.id)
         .then(() => this.$emit('onSuccess'))
         .catch(err => this.$emit('onError', err.error.error))
-    },
-    refreshPopper () {
-      this.showPopper = false
-      this.showDropDown = false
-      setTimeout(() => {
-        this.showPopper = true
-      })
     }
   },
   computed: {
diff --git a/src/components/extra_buttons/extra_buttons.vue b/src/components/extra_buttons/extra_buttons.vue
index 8e24e9a5..d5fc82ac 100644
--- a/src/components/extra_buttons/extra_buttons.vue
+++ b/src/components/extra_buttons/extra_buttons.vue
@@ -1,23 +1,16 @@
 <template>
-  <Popper
-    v-if="enabled && showPopper"
+  <v-popover
+    v-if="enabled"
     trigger="click"
-    append-to-body
-    :options="{
-      placement: 'top',
-      modifiers: {
-        arrow: { enabled: true },
-        offset: { offset: '0, 5px' },
-      }
-    }"
-    @hide="showDropDown = false"
+    class="extra-button-popover"
   >
-    <div class="popper-wrapper">
+    <div class="popper-wrapper" slot="popover">
       <div class="dropdown-menu">
         <button
           v-if="!status.pinned && canPin"
           class="dropdown-item dropdown-item-icon"
           @click.prevent="pinStatus"
+          v-close-popover
         >
           <i class="icon-pin" /><span>{{ $t("status.pin") }}</span>
         </button>
@@ -25,6 +18,7 @@
           v-if="status.pinned && canPin"
           class="dropdown-item dropdown-item-icon"
           @click.prevent="unpinStatus"
+          v-close-popover
         >
           <i class="icon-pin" /><span>{{ $t("status.unpin") }}</span>
         </button>
@@ -32,22 +26,16 @@
           v-if="canDelete"
           class="dropdown-item dropdown-item-icon"
           @click.prevent="deleteStatus"
+          v-close-popover
         >
           <i class="icon-cancel" /><span>{{ $t("status.delete") }}</span>
         </button>
       </div>
     </div>
-    <div
-      slot="reference"
-      class="button-icon"
-      @click="toggleMenu"
-    >
-      <i
-        class="icon-ellipsis"
-        :class="{'icon-clicked': showDropDown}"
-      />
+    <div class="button-icon">
+      <i class="icon-ellipsis" />
     </div>
-  </Popper>
+  </v-popover>
 </template>
 
 <script src="./extra_buttons.js" ></script>
@@ -59,7 +47,8 @@
 .icon-ellipsis {
   cursor: pointer;
 
-  &:hover, &.icon-clicked {
+  &:hover,
+  .extra-button-popover.open & {
     color: $fallback--text;
     color: var(--text, $fallback--text);
   }
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index b825d17d..e9fe0700 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -824,7 +824,7 @@ $status-margin: 0.75em;
   display: flex;
   margin-top: $status-margin;
 
-  div, favorite-button {
+  > * {
     max-width: 4em;
     flex: 1;
   }
-- 
cgit v1.2.3-70-g09d2


From b9c547828e082970f8ad3fb72f81e38b738a6d0c Mon Sep 17 00:00:00 2001
From: taehoon <th.dev91@gmail.com>
Date: Thu, 11 Jul 2019 08:32:57 -0400
Subject: make popover position for status action dropdow relative to parent
 node

---
 src/components/extra_buttons/extra_buttons.vue | 1 +
 src/components/status/status.vue               | 1 +
 2 files changed, 2 insertions(+)

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

diff --git a/src/components/extra_buttons/extra_buttons.vue b/src/components/extra_buttons/extra_buttons.vue
index d5fc82ac..73f3d936 100644
--- a/src/components/extra_buttons/extra_buttons.vue
+++ b/src/components/extra_buttons/extra_buttons.vue
@@ -3,6 +3,7 @@
     v-if="enabled"
     trigger="click"
     class="extra-button-popover"
+    :container="false"
   >
     <div class="popper-wrapper" slot="popover">
       <div class="dropdown-menu">
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index e9fe0700..ab506632 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -820,6 +820,7 @@ $status-margin: 0.75em;
 }
 
 .status-actions {
+  position: relative;
   width: 100%;
   display: flex;
   margin-top: $status-margin;
-- 
cgit v1.2.3-70-g09d2

