upd: allow for Remote Emojis to be Deleted

This commit is contained in:
Insert5StarName 2023-09-22 00:00:12 +02:00
parent 03b5acf17f
commit 7a50bc049e
1 changed files with 11 additions and 1 deletions

View File

@ -165,10 +165,20 @@ const remoteMenu = (emoji, ev: MouseEvent) => {
os.popupMenu([{ os.popupMenu([{
type: 'label', type: 'label',
text: ':' + emoji.name + ':', text: ':' + emoji.name + ':',
}, { },
{
text: i18n.ts.import, text: i18n.ts.import,
icon: 'ti ti-plus', icon: 'ti ti-plus',
action: () => { im(emoji); }, action: () => { im(emoji); },
},
{
text: i18n.ts.delete,
icon: "ti ti-trash",
action: () => {
os.apiWithDialog("admin/emoji/delete", {
id: emoji.id,
});
},
}], ev.currentTarget ?? ev.target); }], ev.currentTarget ?? ev.target);
}; };