diff --git a/packages/frontend/src/pages/emoji-edit-dialog.vue b/packages/frontend/src/pages/emoji-edit-dialog.vue index 2caba0367584..db3f4368737f 100644 --- a/packages/frontend/src/pages/emoji-edit-dialog.vue +++ b/packages/frontend/src/pages/emoji-edit-dialog.vue @@ -10,7 +10,7 @@ SPDX-License-Identifier: AGPL-3.0-only :initialHeight="500" :canResize="true" @close="windowEl.close()" - @closed="$emit('closed')" + @closed="emit('closed')" > @@ -98,6 +98,11 @@ const props = defineProps<{ emoji?: Misskey.entities.EmojiDetailed, }>(); +const emit = defineEmits<{ + (ev: 'done', v: { deleted?: boolean; updated?: Misskey.entities.AdminEmojiUpdateRequest; created?: Misskey.entities.AdminEmojiUpdateRequest }): void, + (ev: 'closed'): void +}>(); + const windowEl = ref | null>(null); const name = ref(props.emoji ? props.emoji.name : ''); const category = ref(props.emoji?.category ? props.emoji.category : ''); @@ -115,11 +120,6 @@ watch(roleIdsThatCanBeUsedThisEmojiAsReaction, async () => { const imgUrl = computed(() => file.value ? file.value.url : props.emoji ? `/emoji/${props.emoji.name}.webp` : null); -const emit = defineEmits<{ - (ev: 'done', v: { deleted?: boolean; updated?: Misskey.entities.AdminEmojiUpdateRequest; created?: Misskey.entities.AdminEmojiUpdateRequest }): void, - (ev: 'closed'): void -}>(); - async function changeImage(ev: Event) { file.value = await selectFile(ev.currentTarget ?? ev.target, null); const candidate = file.value.name.replace(/\.(.+)$/, '');