Add: 絵文字作成ボタンを追加

This commit is contained in:
nullnyat 2022-03-21 17:45:20 +09:00
parent 81374e0eac
commit a1a6e3560a
No known key found for this signature in database
GPG Key ID: 5EDC2816C3AE007A

View File

@ -129,6 +129,13 @@ const add = async (ev: MouseEvent) => {
os.promiseDialog(promise);
};
const create = async (ev: MouseEvent) => {
await os.popupMenu([
{ type: 'button', text: '絵文字ジェネレーター', action: () => window.open('https://emoji-gen.ninja/') },
{ type: 'button', text: 'MEGAMOJI', action: () => window.open('https://zk-phi.github.io/MEGAMOJI/') }
], (ev.currentTarget ?? ev.target ?? undefined) as HTMLElement | undefined);
};
const edit = (emoji) => {
os.popup(import('./emoji-edit-dialog.vue'), {
emoji: emoji
@ -275,10 +282,16 @@ defineExpose({
icon: 'fas fa-plus',
text: i18n.ts.addEmoji,
handler: add,
}, {
asFullButton: true,
icon: 'fas fa-pencil-alt',
text: '絵文字を作成',
handler: create,
}, {
icon: 'fas fa-ellipsis-h',
handler: menu,
}],
tabs: [{
active: tab.value === 'local',
title: i18n.ts.local,