wip
This commit is contained in:
parent
4c07cf74ef
commit
e0ba42df0a
|
@ -262,7 +262,7 @@
|
|||
"vuex": "4.0.0-beta.4",
|
||||
"vuex-persistedstate": "3.1.0",
|
||||
"web-push": "3.4.4",
|
||||
"webpack": "5.0.0-beta.29",
|
||||
"webpack": "5.0.0-beta.30",
|
||||
"webpack-cli": "3.3.12",
|
||||
"websocket": "1.0.31",
|
||||
"ws": "7.3.1",
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<template>
|
||||
<XModal :source="source" ref="popup" @closed="() => { $emit('closed'); destroyDom(); }">
|
||||
<div class="omfetrab">
|
||||
<div class="omfetrab">
|
||||
<header>
|
||||
<button v-for="(category, i) in categories"
|
||||
class="_button"
|
||||
|
@ -58,8 +57,7 @@
|
|||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</XModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -69,13 +67,10 @@ import { getStaticImageUrl } from '@/scripts/get-static-image-url';
|
|||
import { faAsterisk, faLeaf, faUtensils, faFutbol, faCity, faDice, faGlobe, faHistory, faUser } from '@fortawesome/free-solid-svg-icons';
|
||||
import { faHeart, faFlag, faLaugh } from '@fortawesome/free-regular-svg-icons';
|
||||
import { groupByX } from '../../prelude/array';
|
||||
import XModal from './modal.vue';
|
||||
import * as os from '@/os';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
XModal,
|
||||
},
|
||||
emits: ['done'],
|
||||
|
||||
props: {
|
||||
source: {
|
||||
|
@ -163,12 +158,8 @@ export default defineComponent({
|
|||
recents = recents.filter((e: any) => getKey(e) !== getKey(emoji));
|
||||
recents.unshift(emoji)
|
||||
this.$store.commit('device/set', { key: 'recentEmojis', value: recents.splice(0, 16) });
|
||||
this.$emit('chosen', getKey(emoji));
|
||||
this.$emit('done', getKey(emoji));
|
||||
},
|
||||
|
||||
close() {
|
||||
this.$refs.popup.close();
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -606,11 +606,10 @@ export default defineComponent({
|
|||
},
|
||||
|
||||
async insertEmoji(ev) {
|
||||
const vm = os.modal(await import('./emoji-picker.vue'), {
|
||||
source: ev.currentTarget || ev.target
|
||||
}).$once('chosen', emoji => {
|
||||
os.modal(defineAsyncComponent(() => import('@/components/emoji-picker.vue')), {}, emoji => {
|
||||
insertTextAtCursor(this.$refs.text, emoji);
|
||||
vm.close();
|
||||
}, {
|
||||
source: ev.currentTarget || ev.target
|
||||
});
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue