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

This commit is contained in:
NullCat 2022-03-21 17:45:53 +09:00 committed by GitHub
commit b6a92f3680
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -129,6 +129,13 @@ const add = async (ev: MouseEvent) => {
os.promiseDialog(promise); 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) => { const edit = (emoji) => {
os.popup(import('./emoji-edit-dialog.vue'), { os.popup(import('./emoji-edit-dialog.vue'), {
emoji: emoji emoji: emoji
@ -275,10 +282,16 @@ defineExpose({
icon: 'fas fa-plus', icon: 'fas fa-plus',
text: i18n.ts.addEmoji, text: i18n.ts.addEmoji,
handler: add, handler: add,
}, {
asFullButton: true,
icon: 'fas fa-pencil-alt',
text: '絵文字を作成',
handler: create,
}, { }, {
icon: 'fas fa-ellipsis-h', icon: 'fas fa-ellipsis-h',
handler: menu, handler: menu,
}], }],
tabs: [{ tabs: [{
active: tab.value === 'local', active: tab.value === 'local',
title: i18n.ts.local, title: i18n.ts.local,