diff options
| author | Maksim Pechnikov <parallel588@gmail.com> | 2020-06-18 08:47:50 +0300 |
|---|---|---|
| committer | Maksim Pechnikov <parallel588@gmail.com> | 2020-06-18 08:47:50 +0300 |
| commit | 08444c390348076231f15bd84b613cf39380bb72 (patch) | |
| tree | 4e00c479c37a052e51c8d081a76b0d03b3986127 /src/components/react_button/react_button.js | |
| parent | e3d0b2f137ccb355c16788e9b890df609cee1698 (diff) | |
| parent | 57626c125d0477716a638854c4243ee0fde96923 (diff) | |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma-fe into develop
Diffstat (limited to 'src/components/react_button/react_button.js')
| -rw-r--r-- | src/components/react_button/react_button.js | 27 |
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 !== '') { |
