feat: update ContextMenu props var to use new interface and move setting of menuItems to Message component

This commit is contained in:
SauceyRed 2025-07-10 23:56:28 +02:00
parent 11802040bd
commit 0ea9c8f168
Signed by: sauceyred
GPG key ID: 2BF92EB6D8A5CCA7
2 changed files with 9 additions and 11 deletions

View file

@ -5,14 +5,9 @@
</template>
<script lang="ts" setup>
const props = defineProps<{ cursorX: number, cursorY: number }>();
import type { ContextMenuItem } from '~/types/interfaces';
const menuItems = [
{ name: "Edit", callback: editMessage },
{ name: "Reply", callback: replyMessage }
];
const props = defineProps<{ menuItems: ContextMenuItem[], cursorX: number, cursorY: number }>();
onMounted(() => {
const contextMenu = document.getElementById("context-menu");