akkoma-fe/src/components/emoji_reaction_picker/emoji_reaction_picker.vue
FloatingGhost 383743615c
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
reuse emoji picker for react-o-tron
2022-06-16 12:26:28 +01:00

56 lines
1.5 KiB
Vue

<template>
<div class="emoji-picker panel panel-default panel-body">
<div class="content">
<div
class="emoji-content"
:class="{hidden: showingStickers}"
>
<div class="emoji-search">
<input
v-model="keyword"
type="text"
class="form-control"
:placeholder="$t('emoji.search_emoji')"
>
</div>
<div
ref="emoji-groups"
class="emoji-groups"
:class="groupsScrolledClass"
@scroll="onScroll"
>
<div
v-for="group in emojisView"
:key="group.id"
class="emoji-group"
>
<h6
:ref="'group-' + group.id"
class="emoji-group-title"
>
{{ group.text }}
</h6>
<span
v-for="emoji in group.emojis"
:key="group.id + emoji.displayText"
:title="emoji.displayText"
class="emoji-item"
@click.stop.prevent="onEmoji(emoji)"
>
<span v-if="!emoji.imageUrl">{{ emoji.replacement }}</span>
<img
v-else
:src="emoji.imageUrl"
>
</span>
<span :ref="'group-end-' + group.id" />
</div>
</div>
</div>
</div>
</div>
</template>
<script src="./emoji_reaction_picker.js"></script>
<style lang="scss" src="./emoji_reaction_picker.scss"></style>