pleroma-fe/src/components/emoji_picker/emoji_picker.vue

73 lines
1.9 KiB
Vue
Raw Normal View History

2019-03-30 02:49:32 +11:00
<template>
<div class="emoji-picker panel panel-default">
<div class="panel-heading">
<span class="emoji-tabs">
<span
v-for="(value, key) in emojis"
:key="key"
class="emoji-tabs-item"
:class="{'active': activeGroup === key}"
:title="value.text"
@click.prevent="highlight(key)"
>
<i :class="value.icon" />
</span>
</span>
<span class="additional-tabs">
<slot name="tabs" />
2019-07-29 07:10:43 +10:00
</span>
</div>
2019-07-29 07:10:43 +10:00
<div class="panel-body emoji-dropdown-menu-content">
<div
v-if="!showingAdditional"
class="emoji-content"
2019-07-29 07:10:43 +10:00
>
<div class="emoji-search">
<input
v-model="keyword"
type="text"
class="form-control"
>
</div>
2019-07-29 07:10:43 +10:00
<div
ref="emoji-groups"
class="emoji-groups"
@scroll="scrolledGroup"
2019-07-29 07:10:43 +10:00
>
<div
v-for="(value, key) in emojis"
:key="key"
class="emoji-group"
>
<h6
:ref="'group-' + key"
class="emoji-group-title"
2019-07-29 07:10:43 +10:00
>
{{ value.text }}
</h6>
<span
v-for="emoji in value.emojis"
:key="key + emoji.displayText"
:title="emoji.displayText"
class="emoji-item"
@click="onEmoji(emoji)"
>
<span v-if="!emoji.imageUrl">{{ emoji.replacement }}</span>
<img
v-else
:src="emoji.imageUrl"
>
</span>
</div>
2019-07-29 07:10:43 +10:00
</div>
2019-03-30 03:48:52 +11:00
</div>
<div v-if="showingAdditional" class="additional-tabs-content">
<slot name="tab-content" />
</div>
2019-03-30 02:49:32 +11:00
</div>
</div>
2019-03-30 02:49:32 +11:00
</template>
2019-08-12 20:18:37 +10:00
<script src="./emoji_picker.js"></script>
<style lang="scss" src="./emoji_picker.scss"></style>