Update Locale keys

Signed-off-by: mattyatea <mattyacocacora0@gmail.com>
This commit is contained in:
mattyatea 2023-10-20 17:03:09 +09:00
parent c911b51bbe
commit b10b2d747e
No known key found for this signature in database
GPG Key ID: 068E54E2C33BEF9A
2 changed files with 82 additions and 82 deletions

View File

@ -65,7 +65,7 @@ const headerTabs = $computed(() => [{
title: i18n.ts.list, title: i18n.ts.list,
}, { }, {
key: 'draft', key: 'draft',
title: i18n.ts.draftEmojis, title: i18n.ts.requestEmojis,
}]); }]);
definePageMetadata(ref({})); definePageMetadata(ref({}));

View File

@ -4,24 +4,24 @@ SPDX-License-Identifier: AGPL-3.0-only
--> -->
<template> <template>
<div> <div>
<MkStickyContainer> <MkStickyContainer>
<template #header><MkPageHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs"/></template> <template #header><MkPageHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs"/></template>
<MkSpacer :contentMax="900"> <MkSpacer :contentMax="900">
<div class="ogwlenmc"> <div class="ogwlenmc">
<div v-if="tab === 'local'" class="local"> <div v-if="tab === 'local'" class="local">
<MkCustomEmojiEditLocal/> <MkCustomEmojiEditLocal/>
</div> </div>
<div v-if="tab === 'draft'" class="draft"> <div v-if="tab === 'draft'" class="draft">
<MkCustomEmojiEditDraft/> <MkCustomEmojiEditDraft/>
</div> </div>
<div v-else-if="tab === 'remote'" class="remote"> <div v-else-if="tab === 'remote'" class="remote">
<MkCustomEmojiEditRemote/> <MkCustomEmojiEditRemote/>
</div> </div>
</div> </div>
</MkSpacer> </MkSpacer>
</MkStickyContainer> </MkStickyContainer>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@ -37,84 +37,84 @@ import { definePageMetadata } from '@/scripts/page-metadata';
const tab = ref('draft'); const tab = ref('draft');
const add = async (ev: MouseEvent) => { const add = async (ev: MouseEvent) => {
os.popup(defineAsyncComponent(() => import('@/components/MkEmojiEditDialog.vue')), { os.popup(defineAsyncComponent(() => import('@/components/MkEmojiEditDialog.vue')), {
}, { }, {
done: result => { done: result => {
//TODO: emit //TODO: emit
// if (result.created) { // if (result.created) {
// emojisPaginationComponent.value.prepend(result.created); // emojisPaginationComponent.value.prepend(result.created);
// emojisPaginationComponent.value.reload(); // emojisPaginationComponent.value.reload();
// } // }
}, },
}, 'closed'); }, 'closed');
}; };
const menu = (ev: MouseEvent) => { const menu = (ev: MouseEvent) => {
os.popupMenu([{ os.popupMenu([{
icon: 'ti ti-download', icon: 'ti ti-download',
text: i18n.ts.export, text: i18n.ts.export,
action: async () => { action: async () => {
os.api('export-custom-emojis', { os.api('export-custom-emojis', {
}) })
.then(() => { .then(() => {
os.alert({ os.alert({
type: 'info', type: 'info',
text: i18n.ts.exportRequested, text: i18n.ts.exportRequested,
}); });
}).catch((err) => { }).catch((err) => {
os.alert({ os.alert({
type: 'error', type: 'error',
text: err.message, text: err.message,
}); });
}); });
}, },
}, { }, {
icon: 'ti ti-upload', icon: 'ti ti-upload',
text: i18n.ts.import, text: i18n.ts.import,
action: async () => { action: async () => {
const file = await selectFile(ev.currentTarget ?? ev.target); const file = await selectFile(ev.currentTarget ?? ev.target);
os.api('admin/emoji/import-zip', { os.api('admin/emoji/import-zip', {
fileId: file.id, fileId: file.id,
}) })
.then(() => { .then(() => {
os.alert({ os.alert({
type: 'info', type: 'info',
text: i18n.ts.importRequested, text: i18n.ts.importRequested,
}); });
}).catch((err) => { }).catch((err) => {
os.alert({ os.alert({
type: 'error', type: 'error',
text: err.message, text: err.message,
}); });
}); });
}, },
}], ev.currentTarget ?? ev.target); }], ev.currentTarget ?? ev.target);
}; };
const headerActions = $computed(() => [{ const headerActions = $computed(() => [{
asFullButton: true, asFullButton: true,
icon: 'ti ti-plus', icon: 'ti ti-plus',
text: i18n.ts.addEmoji, text: i18n.ts.addEmoji,
handler: add, handler: add,
}, { }, {
icon: 'ti ti-dots', icon: 'ti ti-dots',
handler: menu, handler: menu,
}]); }]);
const headerTabs = $computed(() => [{ const headerTabs = $computed(() => [{
key: 'draft', key: 'draft',
title: i18n.ts.draftEmojis, title: i18n.ts.requestEmojis,
}, { }, {
key: 'local', key: 'local',
title: i18n.ts.local, title: i18n.ts.local,
}, { }, {
key: 'remote', key: 'remote',
title: i18n.ts.remote, title: i18n.ts.remote,
}]); }]);
definePageMetadata(computed(() => ({ definePageMetadata(computed(() => ({
title: i18n.ts.customEmojis, title: i18n.ts.customEmojis,
icon: 'ti ti-icons', icon: 'ti ti-icons',
}))); })));
</script> </script>