aboutsummaryrefslogtreecommitdiff
path: root/src/components/react_button/react_button.js
diff options
context:
space:
mode:
authorShpuld Shpludson <shp@cock.li>2020-02-28 16:39:47 +0000
committerShpuld Shpludson <shp@cock.li>2020-02-28 16:39:47 +0000
commit31225f5d142b51d52bed305f25a37288c9188062 (patch)
treeec26cdbf70913cd5176a3345862d5af225991563 /src/components/react_button/react_button.js
parentd19c64314ff08391a2649681e6b64d052e600059 (diff)
Fix/popover performance
Diffstat (limited to 'src/components/react_button/react_button.js')
-rw-r--r--src/components/react_button/react_button.js23
1 files changed, 7 insertions, 16 deletions
diff --git a/src/components/react_button/react_button.js b/src/components/react_button/react_button.js
index a6cf5b94..19949563 100644
--- a/src/components/react_button/react_button.js
+++ b/src/components/react_button/react_button.js
@@ -1,34 +1,25 @@
+import Popover from '../popover/popover.vue'
import { mapGetters } from 'vuex'
const ReactButton = {
props: ['status', 'loggedIn'],
data () {
return {
- showTooltip: false,
- filterWord: '',
- popperOptions: {
- modifiers: {
- preventOverflow: { padding: { top: 50 }, boundariesElement: 'viewport' }
- }
- }
+ filterWord: ''
}
},
+ components: {
+ Popover
+ },
methods: {
- openReactionSelect () {
- this.showTooltip = true
- this.filterWord = ''
- },
- closeReactionSelect () {
- this.showTooltip = false
- },
- addReaction (event, emoji) {
+ addReaction (event, emoji, close) {
const existingReaction = this.status.emoji_reactions.find(r => r.name === emoji)
if (existingReaction && existingReaction.me) {
this.$store.dispatch('unreactWithEmoji', { id: this.status.id, emoji })
} else {
this.$store.dispatch('reactWithEmoji', { id: this.status.id, emoji })
}
- this.closeReactionSelect()
+ close()
}
},
computed: {