1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-27 04:58:57 +09:00
cherrypick/packages/client/src/pages/emojis.vue

61 lines
1.2 KiB
Vue
Raw Normal View History

2021-08-07 10:23:59 +09:00
<template>
<MkStickyContainer>
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
<div :class="$style.root">
<XCategory v-if="tab === 'category'"/>
</div>
</MkStickyContainer>
2021-08-07 10:23:59 +09:00
</template>
<script lang="ts" setup>
import { ref, computed } from 'vue';
import XCategory from './emojis.category.vue';
import * as os from '@/os';
import { i18n } from '@/i18n';
import { definePageMetadata } from '@/scripts/page-metadata';
2021-08-07 10:23:59 +09:00
const tab = ref('category');
2021-08-07 10:23:59 +09: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((err) => {
os.alert({
type: 'error',
text: err.message,
});
});
},
2022-01-28 11:53:12 +09:00
}], ev.currentTarget ?? ev.target);
}
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 10:23:59 +09:00
});
</script>
2021-09-21 04:09:28 +09:00
<style lang="scss" module>
.root {
max-width: 1000px;
margin: 0 auto;
}
2021-08-07 10:23:59 +09:00
</style>