Revert "Add a super basic keep reaction open button"
This reverts commit d8ec9f596d
.
This commit is contained in:
parent
8d3d8de7a3
commit
8cff52ac32
2 changed files with 6 additions and 26 deletions
|
@ -1,4 +1,3 @@
|
|||
import Checkbox from '../checkbox/checkbox.vue'
|
||||
import Popover from '../popover/popover.vue'
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import { faSmileBeam } from '@fortawesome/free-regular-svg-icons'
|
||||
|
@ -9,26 +8,21 @@ const ReactButton = {
|
|||
props: ['status'],
|
||||
data () {
|
||||
return {
|
||||
filterWord: '',
|
||||
keepReactOpen: false
|
||||
filterWord: ''
|
||||
}
|
||||
},
|
||||
components: {
|
||||
Popover,
|
||||
Checkbox
|
||||
Popover
|
||||
},
|
||||
methods: {
|
||||
addReaction (event, emoji, close, keepReactOpen) {
|
||||
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.keepReactOpen = keepReactOpen
|
||||
if (!keepReactOpen) {
|
||||
close()
|
||||
}
|
||||
close()
|
||||
},
|
||||
focusInput () {
|
||||
this.$nextTick(() => {
|
||||
|
|
|
@ -16,18 +16,13 @@
|
|||
:placeholder="$t('emoji.search_emoji')"
|
||||
>
|
||||
</div>
|
||||
<div class="keep-open">
|
||||
<Checkbox v-model="keepReactOpen">
|
||||
{{ $t('emoji.keep_open') }}
|
||||
</Checkbox>
|
||||
</div>
|
||||
<div class="reaction-picker">
|
||||
<span
|
||||
v-for="emoji in commonEmojis"
|
||||
:key="emoji.replacement"
|
||||
class="emoji-button"
|
||||
:title="emoji.displayText"
|
||||
@click="addReaction($event, emoji.replacement, close, keepReactOpen)"
|
||||
@click="addReaction($event, emoji.replacement, close)"
|
||||
>
|
||||
{{ emoji.replacement }}
|
||||
</span>
|
||||
|
@ -37,7 +32,7 @@
|
|||
:key="key"
|
||||
class="emoji-button"
|
||||
:title="emoji.displayText"
|
||||
@click="addReaction($event, emoji.replacement, close, keepReactOpen)"
|
||||
@click="addReaction($event, emoji.replacement, close)"
|
||||
>
|
||||
<img
|
||||
v-if="emoji.imageUrl !== false"
|
||||
|
@ -141,15 +136,6 @@
|
|||
color: var(--text, $fallback--text);
|
||||
}
|
||||
}
|
||||
.keep-open,
|
||||
.too-many-emoji {
|
||||
padding: 7px;
|
||||
line-height: normal;
|
||||
}
|
||||
.keep-open-label {
|
||||
padding: 0 7px;
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
Loading…
Reference in a new issue