Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
noridev committed May 29, 2024
1 parent 7f2ce53 commit 1066404
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions packages/frontend/src/components/MkReactionsViewer.reaction.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,35 +120,35 @@ async function toggleReaction(ev: MouseEvent) {
}
function stealReaction(ev: MouseEvent) {
if (props.note.user.host && $i && ($i.isAdmin ?? $i.policies.canManageCustomEmojis)) {
os.popupMenu([{
type: 'label',
text: props.reaction,
}, {
text: i18n.ts.import,
icon: 'ti ti-plus',
action: async () => {
await os.apiWithDialog('admin/emoji/steal', {
name: reactionName.value,
host: props.note.user.host,
});
},
}, {
text: `${i18n.ts.doReaction} (${i18n.ts.import})`,
icon: 'ti ti-mood-plus',
action: async () => {
await os.apiWithDialog('admin/emoji/steal', {
name: reactionName.value,
host: props.note.user.host,
});
if (!props.note.user.host && $i && !($i.isAdmin ?? $i.policies.canManageCustomEmojis)) return;
await misskeyApi('notes/reactions/create', {
noteId: props.note.id,
reaction: `:${reactionName.value}:`,
});
},
}], ev.currentTarget ?? ev.target);
}
os.popupMenu([{
type: 'label',
text: props.reaction,
}, {
text: i18n.ts.import,
icon: 'ti ti-plus',
action: async () => {
await os.apiWithDialog('admin/emoji/steal', {
name: reactionName.value,
host: props.note.user.host,
});
},
}, {
text: `${i18n.ts.doReaction} (${i18n.ts.import})`,
icon: 'ti ti-mood-plus',
action: async () => {
await os.apiWithDialog('admin/emoji/steal', {
name: reactionName.value,
host: props.note.user.host,
});
await misskeyApi('notes/reactions/create', {
noteId: props.note.id,
reaction: `:${reactionName.value}:`,
});
},
}], ev.currentTarget ?? ev.target);
}
async function menu(ev) {
Expand Down

0 comments on commit 1066404

Please sign in to comment.