2019-03-29 15:49:32 +00:00
|
|
|
<template>
|
2019-09-08 12:51:17 +00:00
|
|
|
<div class="emoji-picker panel panel-default panel-body">
|
|
|
|
<div class="heading">
|
2019-08-12 11:20:08 +00:00
|
|
|
<span class="emoji-tabs">
|
|
|
|
<span
|
2019-08-12 17:01:38 +00:00
|
|
|
v-for="group in emojis"
|
|
|
|
:key="group.id"
|
2019-08-12 11:20:08 +00:00
|
|
|
class="emoji-tabs-item"
|
2019-08-12 17:01:38 +00:00
|
|
|
:class="{
|
|
|
|
active: activeGroupView === group.id,
|
|
|
|
disabled: group.emojis.length === 0
|
|
|
|
}"
|
|
|
|
:title="group.text"
|
|
|
|
@click.prevent="highlight(group.id)"
|
2019-08-12 11:20:08 +00:00
|
|
|
>
|
2020-10-19 16:38:49 +00:00
|
|
|
<FAIcon :icon="group.icon" fixed-width/>
|
2019-08-12 11:20:08 +00:00
|
|
|
</span>
|
|
|
|
</span>
|
2019-08-12 17:01:38 +00:00
|
|
|
<span
|
2019-09-12 17:36:43 +00:00
|
|
|
v-if="stickerPickerEnabled"
|
2019-08-12 17:01:38 +00:00
|
|
|
class="additional-tabs"
|
|
|
|
>
|
|
|
|
<span
|
|
|
|
class="stickers-tab-icon additional-tabs-item"
|
|
|
|
:class="{active: showingStickers}"
|
|
|
|
:title="$t('emoji.stickers')"
|
|
|
|
@click.prevent="toggleStickers"
|
|
|
|
>
|
2020-10-19 16:38:49 +00:00
|
|
|
<FAIcon icon="sticky-note" fixed-width/>
|
2019-08-12 17:01:38 +00:00
|
|
|
</span>
|
2019-07-28 21:10:43 +00:00
|
|
|
</span>
|
2019-07-28 13:07:01 +00:00
|
|
|
</div>
|
2019-09-08 12:51:17 +00:00
|
|
|
<div class="content">
|
2019-07-28 21:10:43 +00:00
|
|
|
<div
|
2019-08-12 11:20:08 +00:00
|
|
|
class="emoji-content"
|
2019-08-12 17:01:38 +00:00
|
|
|
:class="{hidden: showingStickers}"
|
2019-07-28 21:10:43 +00:00
|
|
|
>
|
2019-08-12 11:20:08 +00:00
|
|
|
<div class="emoji-search">
|
|
|
|
<input
|
|
|
|
v-model="keyword"
|
|
|
|
type="text"
|
|
|
|
class="form-control"
|
2019-08-12 17:01:38 +00:00
|
|
|
:placeholder="$t('emoji.search_emoji')"
|
2019-08-12 11:20:08 +00:00
|
|
|
>
|
|
|
|
</div>
|
2019-07-28 21:10:43 +00:00
|
|
|
<div
|
2019-08-12 11:20:08 +00:00
|
|
|
ref="emoji-groups"
|
|
|
|
class="emoji-groups"
|
2019-09-14 22:16:54 +00:00
|
|
|
:class="groupsScrolledClass"
|
2019-11-08 19:25:13 +00:00
|
|
|
@scroll="onScroll"
|
2019-07-28 21:10:43 +00:00
|
|
|
>
|
2019-08-12 11:20:08 +00:00
|
|
|
<div
|
2019-08-12 17:01:38 +00:00
|
|
|
v-for="group in emojisView"
|
|
|
|
:key="group.id"
|
2019-08-12 11:20:08 +00:00
|
|
|
class="emoji-group"
|
2019-07-28 13:07:01 +00:00
|
|
|
>
|
2019-08-12 11:20:08 +00:00
|
|
|
<h6
|
2019-08-12 17:01:38 +00:00
|
|
|
:ref="'group-' + group.id"
|
2019-08-12 11:20:08 +00:00
|
|
|
class="emoji-group-title"
|
2019-07-28 21:10:43 +00:00
|
|
|
>
|
2019-08-12 17:01:38 +00:00
|
|
|
{{ group.text }}
|
2019-08-12 11:20:08 +00:00
|
|
|
</h6>
|
|
|
|
<span
|
2019-08-12 17:01:38 +00:00
|
|
|
v-for="emoji in group.emojis"
|
|
|
|
:key="group.id + emoji.displayText"
|
2019-08-12 11:20:08 +00:00
|
|
|
:title="emoji.displayText"
|
|
|
|
class="emoji-item"
|
2019-08-12 17:01:38 +00:00
|
|
|
@click.stop.prevent="onEmoji(emoji)"
|
2019-09-10 18:39:45 +00:00
|
|
|
>
|
2019-09-12 16:15:22 +00:00
|
|
|
<span v-if="!emoji.imageUrl">{{ emoji.replacement }}</span>
|
2019-08-12 11:20:08 +00:00
|
|
|
<img
|
|
|
|
v-else
|
|
|
|
:src="emoji.imageUrl"
|
2019-09-12 16:15:22 +00:00
|
|
|
>
|
2019-08-12 11:20:08 +00:00
|
|
|
</span>
|
2019-11-08 19:35:58 +00:00
|
|
|
<span :ref="'group-end-' + group.id" />
|
2019-08-12 11:20:08 +00:00
|
|
|
</div>
|
2019-07-28 21:10:43 +00:00
|
|
|
</div>
|
2019-10-07 17:43:23 +00:00
|
|
|
<div class="keep-open">
|
|
|
|
<Checkbox v-model="keepOpen">
|
|
|
|
{{ $t('emoji.keep_open') }}
|
|
|
|
</Checkbox>
|
2019-09-08 12:51:17 +00:00
|
|
|
</div>
|
2019-03-29 16:48:52 +00:00
|
|
|
</div>
|
2019-08-12 17:01:38 +00:00
|
|
|
<div
|
|
|
|
v-if="showingStickers"
|
|
|
|
class="stickers-content"
|
|
|
|
>
|
|
|
|
<sticker-picker
|
|
|
|
@uploaded="onStickerUploaded"
|
|
|
|
@upload-failed="onStickerUploadFailed"
|
|
|
|
/>
|
2019-08-12 11:20:08 +00:00
|
|
|
</div>
|
2019-03-29 15:49:32 +00:00
|
|
|
</div>
|
2019-08-12 17:01:38 +00:00
|
|
|
</div>
|
2019-03-29 15:49:32 +00:00
|
|
|
</template>
|
|
|
|
|
2019-08-12 10:18:37 +00:00
|
|
|
<script src="./emoji_picker.js"></script>
|
2019-08-12 11:20:08 +00:00
|
|
|
<style lang="scss" src="./emoji_picker.scss"></style>
|