aboutsummaryrefslogtreecommitdiff
path: root/src/components/react_button/react_button.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/react_button/react_button.js')
-rw-r--r--src/components/react_button/react_button.js27
1 files changed, 9 insertions, 18 deletions
diff --git a/src/components/react_button/react_button.js b/src/components/react_button/react_button.js
index a6cf5b94..f0931446 100644
--- a/src/components/react_button/react_button.js
+++ b/src/components/react_button/react_button.js
@@ -1,39 +1,30 @@
+import Popover from '../popover/popover.vue'
import { mapGetters } from 'vuex'
const ReactButton = {
- props: ['status', 'loggedIn'],
+ props: ['status'],
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: {
commonEmojis () {
- return ['❤️', '😠', '👀', '😂', '🔥']
+ return ['👍', '😠', '👀', '😂', '🔥']
},
emojis () {
if (this.filterWord !== '') {