From 03c2f29b0aa31eb502db29e5a809da8bc1c1af28 Mon Sep 17 00:00:00 2001
From: Henry Jameson <me@hjkos.com>
Date: Sun, 28 Jul 2019 16:07:01 +0300
Subject: cleanup and appropriation for new emoji-input component API, styles
 updates

---
 src/components/emoji-picker/emoji-picker.vue | 57 +++++++++++++---------------
 1 file changed, 26 insertions(+), 31 deletions(-)

(limited to 'src/components/emoji-picker/emoji-picker.vue')

diff --git a/src/components/emoji-picker/emoji-picker.vue b/src/components/emoji-picker/emoji-picker.vue
index 663d9e2e..ea93e6fc 100644
--- a/src/components/emoji-picker/emoji-picker.vue
+++ b/src/components/emoji-picker/emoji-picker.vue
@@ -1,36 +1,31 @@
 <template>
-  <div class="emoji-dropdown" @click.prevent="insideClicked">
-    <span class="emoji-dropdown-toggle" @click.prevent="togglePanel">
-      <i class="icon-smile"></i>
+<div class="emoji-dropdown-menu panel panel-default">
+  <div class="panel-heading emoji-tabs">
+    <span class="emoji-tabs-item" :class="{'active': activeGroup === key}" v-for="(value, key) in emojis" :key="key" :title="value.text" @click.prevent="highlight(key)">
+      <i :class="value.icon"></i>
     </span>
-    <div class="emoji-dropdown-menu panel panel-default" v-if="open">
-      <div class="panel-heading emoji-tabs">
-        <span class="emoji-tabs-item" :class="{'active': activeGroup === key}" v-for="(value, key) in emojis" :key="key" :title="value.text" @click.prevent="highlight(key)">
-          <i :class="value.icon"></i>
+  </div>
+  <div class="panel-body emoji-dropdown-menu-content">
+    <div class="emoji-search">
+      <input type="text" class="form-control" v-model="keyword" />
+    </div>
+    <div class="emoji-groups" ref="emoji-groups" @scroll="scrolledGroup">
+      <div v-for="(value, key) in emojis" :key="key" class="emoji-group">
+        <h6 class="emoji-group-title" :ref="'group-' + key">{{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 :src="emoji.imageUrl" v-else>
         </span>
       </div>
-      <div class="panel-body emoji-dropdown-menu-content">
-        <div class="emoji-search">
-          <input type="text" class="form-control" v-model="keyword" />
-        </div>
-        <div class="emoji-groups" ref="emoji-groups" @scroll="scrolledGroup">
-          <div v-for="(value, key) in emojis" :key="key" class="emoji-group">
-            <h6 class="emoji-group-title" :ref="'group-' + key">{{value.text}}</h6>
-            <span
-              v-for="emoji in value.emojis"
-              :key="key + emoji.shortcode"
-              :title="emoji.shortcode"
-              class="emoji-item"
-              @click="onEmoji(emoji)"
-            >
-              <span v-if="!emoji.image_url">{{emoji.utf}}</span>
-              <img :src="serverUrl + emoji.image_url" v-else>
-            </span>
-          </div>
-        </div>
-      </div>
     </div>
   </div>
+</div>
 </template>
 
 <script src="./emoji-picker.js"></script>
@@ -119,14 +114,14 @@
   }
 
   &-item {
-    width: 34px;
-    height: 34px;
+    width: 32px;
+    height: 32px;
     box-sizing: border-box;
     display: flex;
-    font-size: 16px;
+    font-size: 32px;
     align-items: center;
     justify-content: center;
-    padding: 5px;
+    margin: 2px;
     cursor: pointer;
 
     img {
-- 
cgit v1.2.3-70-g09d2

