2019-03-29 15:49:32 +00:00
|
|
|
<template>
|
2019-07-28 21:10:43 +00:00
|
|
|
<div class="emoji-dropdown-menu panel panel-default">
|
|
|
|
<div class="panel-heading 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>
|
2019-07-28 13:07:01 +00:00
|
|
|
</div>
|
2019-07-28 21:10:43 +00:00
|
|
|
<div class="panel-body emoji-dropdown-menu-content">
|
|
|
|
<div class="emoji-search">
|
|
|
|
<input
|
|
|
|
v-model="keyword"
|
|
|
|
type="text"
|
|
|
|
class="form-control"
|
|
|
|
>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
ref="emoji-groups"
|
|
|
|
class="emoji-groups"
|
|
|
|
@scroll="scrolledGroup"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
v-for="(value, key) in emojis"
|
|
|
|
:key="key"
|
|
|
|
class="emoji-group"
|
|
|
|
>
|
|
|
|
<h6
|
|
|
|
:ref="'group-' + key"
|
|
|
|
class="emoji-group-title"
|
|
|
|
>
|
|
|
|
{{ value.text }}
|
|
|
|
</h6>
|
|
|
|
<span
|
|
|
|
v-for="emoji in value.emojis"
|
|
|
|
:key="key + emoji.displayText"
|
|
|
|
:title="emoji.displayText"
|
|
|
|
class="emoji-item"
|
|
|
|
@click="onEmoji(emoji)"
|
2019-07-28 13:07:01 +00:00
|
|
|
>
|
2019-07-28 21:10:43 +00:00
|
|
|
<span v-if="!emoji.imageUrl">{{ emoji.replacement }}</span>
|
|
|
|
<img
|
|
|
|
v-else
|
|
|
|
:src="emoji.imageUrl"
|
|
|
|
>
|
|
|
|
</span>
|
|
|
|
</div>
|
2019-03-29 16:48:52 +00:00
|
|
|
</div>
|
2019-03-29 15:49:32 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2019-07-28 10:56:08 +00:00
|
|
|
<script src="./emoji-picker.js"></script>
|
2019-03-29 15:49:32 +00:00
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
@import '../../_variables.scss';
|
|
|
|
|
|
|
|
.emoji {
|
|
|
|
&-dropdown {
|
2019-03-29 19:56:50 +00:00
|
|
|
position: absolute;
|
2019-03-29 20:34:59 +00:00
|
|
|
right: 0;
|
2019-04-08 15:10:26 +00:00
|
|
|
top: 28px;
|
2019-03-29 19:56:50 +00:00
|
|
|
z-index: 1;
|
2019-03-29 15:49:32 +00:00
|
|
|
|
|
|
|
&-toggle {
|
|
|
|
cursor: pointer;
|
2019-03-29 19:56:50 +00:00
|
|
|
position: absolute;
|
2019-04-08 15:50:12 +00:00
|
|
|
top: -23px;
|
2019-03-29 20:34:59 +00:00
|
|
|
right: 2px;
|
2019-04-08 15:10:26 +00:00
|
|
|
line-height: 1;
|
2019-03-29 20:34:59 +00:00
|
|
|
|
|
|
|
i {
|
|
|
|
font-size: 18px;
|
|
|
|
}
|
2019-03-29 15:49:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&-menu {
|
|
|
|
position: absolute;
|
|
|
|
z-index: 1;
|
|
|
|
right: 0;
|
|
|
|
width: 300px;
|
|
|
|
height: 300px;
|
|
|
|
display: flex;
|
2019-03-29 16:48:52 +00:00
|
|
|
flex-direction: column;
|
2019-03-29 19:56:50 +00:00
|
|
|
margin: 0 !important;
|
2019-03-29 16:48:52 +00:00
|
|
|
|
|
|
|
&-content {
|
|
|
|
flex: 1 1 1px;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-tabs {
|
|
|
|
&-item {
|
|
|
|
padding: 0 5px;
|
|
|
|
|
2019-04-05 18:51:25 +00:00
|
|
|
&.active {
|
2019-03-29 16:48:52 +00:00
|
|
|
border-bottom: 4px solid;
|
|
|
|
|
|
|
|
i {
|
|
|
|
color: $fallback--lightText;
|
|
|
|
color: var(--lightText, $fallback--lightText);
|
|
|
|
}
|
2019-03-29 15:49:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-29 16:48:52 +00:00
|
|
|
&-search {
|
|
|
|
padding: 5px;
|
2019-04-08 16:02:50 +00:00
|
|
|
|
|
|
|
input {
|
|
|
|
width: 100%;
|
|
|
|
}
|
2019-03-29 16:48:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&-groups {
|
|
|
|
flex: 1 1 1px;
|
|
|
|
overflow: auto;
|
2019-04-05 18:51:25 +00:00
|
|
|
position: relative;
|
2019-03-29 16:48:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&-group {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
&-title {
|
|
|
|
font-size: 12px;
|
|
|
|
width: 100%;
|
|
|
|
margin: 0;
|
|
|
|
padding: 5px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-29 15:49:32 +00:00
|
|
|
&-item {
|
2019-07-28 13:07:01 +00:00
|
|
|
width: 32px;
|
|
|
|
height: 32px;
|
2019-03-29 15:49:32 +00:00
|
|
|
box-sizing: border-box;
|
|
|
|
display: flex;
|
2019-07-28 13:07:01 +00:00
|
|
|
font-size: 32px;
|
2019-03-29 15:49:32 +00:00
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
2019-07-28 13:07:01 +00:00
|
|
|
margin: 2px;
|
2019-03-29 15:49:32 +00:00
|
|
|
cursor: pointer;
|
2019-03-29 16:48:52 +00:00
|
|
|
|
|
|
|
img {
|
|
|
|
max-width: 100%;
|
|
|
|
max-height: 100%;
|
|
|
|
}
|
2019-03-29 15:49:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|