feat: カスタム絵文字エクスポート

This commit is contained in:
syuilo
2021-12-10 18:24:26 +09:00
parent 0b038f6477
commit bd903cdbb5
10 changed files with 298 additions and 5 deletions

View File

@ -21,10 +21,38 @@ export default defineComponent({
title: this.$ts.customEmojis,
icon: 'fas fa-laugh',
bg: 'var(--bg)',
actions: [{
icon: 'fas fa-ellipsis-h',
handler: this.menu
}],
})),
tab: 'category',
}
},
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);
}
}
});
</script>