yumechi-no-kuni/packages/client/src/pages/emojis.vue

57 lines
1,004 B
Vue
Raw Normal View History

2021-08-06 20:23:59 -05:00
<template>
2021-10-23 14:03:07 -05:00
<div :class="$style.root">
<XCategory v-if="tab === 'category'"/>
2021-09-20 14:09:28 -05:00
</div>
2021-08-06 20:23:59 -05:00
</template>
<script lang="ts" setup>
import { ref, computed } from 'vue';
2021-11-11 11:02:25 -06:00
import * as os from '@/os';
import * as symbols from '@/symbols';
import XCategory from './emojis.category.vue';
import { i18n } from '@/i18n';
2021-08-06 20:23:59 -05:00
const tab = ref('category');
2021-08-06 20:23:59 -05:00
function menu(ev) {
os.popupMenu([{
icon: 'fas fa-download',
text: i18n.ts.export,
action: async () => {
os.api('export-custom-emojis', {
})
.then(() => {
os.alert({
type: 'info',
text: i18n.ts.exportRequested,
});
}).catch((e) => {
os.alert({
type: 'error',
text: e.message,
});
});
2021-08-06 20:23:59 -05:00
}
}], ev.currentTarget || ev.target);
}
defineExpose({
[symbols.PAGE_INFO]: {
title: i18n.ts.customEmojis,
icon: 'fas fa-laugh',
bg: 'var(--bg)',
actions: [{
icon: 'fas fa-ellipsis-h',
handler: menu,
}],
},
2021-08-06 20:23:59 -05:00
});
</script>
2021-09-20 14:09:28 -05:00
<style lang="scss" module>
.root {
max-width: 1000px;
margin: 0 auto;
}
2021-08-06 20:23:59 -05:00
</style>