2021-08-07 04:23:59 +03:00
|
|
|
<template>
|
2021-10-23 22:03:07 +03:00
|
|
|
<div :class="$style.root">
|
|
|
|
<XCategory v-if="tab === 'category'"/>
|
2021-09-20 22:09:28 +03:00
|
|
|
</div>
|
2021-08-07 04:23:59 +03:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2021-09-17 16:39:15 +03:00
|
|
|
import { defineComponent, computed } from 'vue';
|
2021-11-11 19:02:25 +02:00
|
|
|
import * as os from '@/os';
|
|
|
|
import * as symbols from '@/symbols';
|
2021-09-17 16:39:15 +03:00
|
|
|
import XCategory from './emojis.category.vue';
|
2021-08-07 04:23:59 +03:00
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
components: {
|
2021-09-17 16:39:15 +03:00
|
|
|
XCategory,
|
2021-08-07 04:23:59 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
2021-09-17 16:39:15 +03:00
|
|
|
[symbols.PAGE_INFO]: computed(() => ({
|
2021-08-07 04:23:59 +03:00
|
|
|
title: this.$ts.customEmojis,
|
2021-09-17 16:39:15 +03:00
|
|
|
icon: 'fas fa-laugh',
|
|
|
|
bg: 'var(--bg)',
|
2021-12-10 11:24:26 +02:00
|
|
|
actions: [{
|
|
|
|
icon: 'fas fa-ellipsis-h',
|
|
|
|
handler: this.menu
|
|
|
|
}],
|
2021-09-17 16:39:15 +03:00
|
|
|
})),
|
|
|
|
tab: 'category',
|
2021-08-07 04:23:59 +03:00
|
|
|
}
|
|
|
|
},
|
2021-12-10 11:24:26 +02:00
|
|
|
|
|
|
|
methods: {
|
|
|
|
menu(ev) {
|
|
|
|
os.popupMenu([{
|
|
|
|
icon: 'fas fa-download',
|
|
|
|
text: this.$ts.export,
|
|
|
|
action: async () => {
|
|
|
|
os.api('export-custom-emojis', {
|
|
|
|
})
|
|
|
|
.then(() => {
|
|
|
|
os.alert({
|
|
|
|
type: 'info',
|
|
|
|
text: this.$ts.exportRequested,
|
|
|
|
});
|
|
|
|
}).catch((e) => {
|
|
|
|
os.alert({
|
|
|
|
type: 'error',
|
|
|
|
text: e.message,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}], ev.currentTarget || ev.target);
|
|
|
|
}
|
|
|
|
}
|
2021-08-07 04:23:59 +03:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2021-09-20 22:09:28 +03:00
|
|
|
<style lang="scss" module>
|
|
|
|
.root {
|
|
|
|
max-width: 1000px;
|
|
|
|
margin: 0 auto;
|
|
|
|
}
|
2021-08-07 04:23:59 +03:00
|
|
|
</style>
|