2021-08-07 01:23:59 +00:00
|
|
|
<template>
|
2022-06-20 08:38:49 +00:00
|
|
|
<MkStickyContainer>
|
|
|
|
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
|
|
|
|
<div :class="$style.root">
|
|
|
|
<XCategory v-if="tab === 'category'"/>
|
|
|
|
</div>
|
|
|
|
</MkStickyContainer>
|
2021-08-07 01:23:59 +00:00
|
|
|
</template>
|
|
|
|
|
2022-01-12 17:36:51 +00:00
|
|
|
<script lang="ts" setup>
|
|
|
|
import { ref, computed } from 'vue';
|
2021-09-17 13:39:15 +00:00
|
|
|
import XCategory from './emojis.category.vue';
|
2022-06-20 08:38:49 +00:00
|
|
|
import * as os from '@/os';
|
2022-01-12 17:36:51 +00:00
|
|
|
import { i18n } from '@/i18n';
|
2022-06-20 08:38:49 +00:00
|
|
|
import { definePageMetadata } from '@/scripts/page-metadata';
|
2021-08-07 01:23:59 +00:00
|
|
|
|
2022-01-12 17:36:51 +00:00
|
|
|
const tab = ref('category');
|
2021-08-07 01:23:59 +00:00
|
|
|
|
2022-01-12 17:36:51 +00:00
|
|
|
function menu(ev) {
|
|
|
|
os.popupMenu([{
|
|
|
|
icon: 'fas fa-download',
|
2022-01-28 02:39:49 +00:00
|
|
|
text: i18n.ts.export,
|
2022-01-12 17:36:51 +00:00
|
|
|
action: async () => {
|
|
|
|
os.api('export-custom-emojis', {
|
|
|
|
})
|
|
|
|
.then(() => {
|
|
|
|
os.alert({
|
|
|
|
type: 'info',
|
2022-01-28 02:39:49 +00:00
|
|
|
text: i18n.ts.exportRequested,
|
2022-01-12 17:36:51 +00:00
|
|
|
});
|
2022-05-26 13:53:09 +00:00
|
|
|
}).catch((err) => {
|
2022-01-12 17:36:51 +00:00
|
|
|
os.alert({
|
|
|
|
type: 'error',
|
2022-05-26 13:53:09 +00:00
|
|
|
text: err.message,
|
2022-01-12 17:36:51 +00:00
|
|
|
});
|
|
|
|
});
|
2022-06-20 08:38:49 +00:00
|
|
|
},
|
2022-01-28 02:53:12 +00:00
|
|
|
}], ev.currentTarget ?? ev.target);
|
2022-01-12 17:36:51 +00:00
|
|
|
}
|
2021-12-10 09:24:26 +00:00
|
|
|
|
2022-06-20 08:38:49 +00:00
|
|
|
const headerActions = $computed(() => [{
|
|
|
|
icon: 'fas fa-ellipsis-h',
|
|
|
|
handler: menu,
|
|
|
|
}]);
|
|
|
|
|
|
|
|
const headerTabs = $computed(() => []);
|
|
|
|
|
|
|
|
definePageMetadata({
|
|
|
|
title: i18n.ts.customEmojis,
|
|
|
|
icon: 'fas fa-laugh',
|
|
|
|
bg: 'var(--bg)',
|
2021-08-07 01:23:59 +00:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2021-09-20 19:09:28 +00:00
|
|
|
<style lang="scss" module>
|
|
|
|
.root {
|
|
|
|
max-width: 1000px;
|
|
|
|
margin: 0 auto;
|
|
|
|
}
|
2021-08-07 01:23:59 +00:00
|
|
|
</style>
|