diff options
| author | Shpuld Shpuldson <shp@cock.li> | 2020-05-04 11:05:05 +0300 |
|---|---|---|
| committer | Shpuld Shpuldson <shp@cock.li> | 2020-05-04 11:05:05 +0300 |
| commit | 101eebb40be4dd87df83247e9db655c3cb135f48 (patch) | |
| tree | 043b1c06a078d0b845bc036a87165ac2568391b2 /src/components/react_button/react_button.js | |
| parent | 39e3917118293912b2af09f509457d718f0207c9 (diff) | |
| parent | 9b349b40196778abe1a2cdb1d241d4c9572d305c (diff) | |
Merge branch 'develop' into fix/signup-without-email
Diffstat (limited to 'src/components/react_button/react_button.js')
| -rw-r--r-- | src/components/react_button/react_button.js | 23 |
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: { |
