From 1727c815f8bb9651a687d4329c4e7e13b7f1983d Mon Sep 17 00:00:00 2001
From: taehoon
Date: Thu, 11 Jul 2019 08:30:35 -0400
Subject: install v-tooltip
---
src/main.js | 2 ++
1 file changed, 2 insertions(+)
(limited to 'src')
diff --git a/src/main.js b/src/main.js
index 3287fa2b..b3256e8e 100644
--- a/src/main.js
+++ b/src/main.js
@@ -26,6 +26,7 @@ import messages from './i18n/messages.js'
import VueChatScroll from 'vue-chat-scroll'
import VueClickOutside from 'v-click-outside'
import PortalVue from 'portal-vue'
+import VTooltip from 'v-tooltip'
import afterStoreSetup from './boot/after_store.js'
@@ -37,6 +38,7 @@ Vue.use(VueI18n)
Vue.use(VueChatScroll)
Vue.use(VueClickOutside)
Vue.use(PortalVue)
+Vue.use(VTooltip)
const i18n = new VueI18n({
// By default, use the browser locale, we will update it if neccessary
--
cgit v1.2.3-70-g09d2
From 005815c8259e3ccbc1fdd9c4d352aa4053d187c4 Mon Sep 17 00:00:00 2001
From: taehoon
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')
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 @@
-