wip: Add ban and kick to context menu #69

Draft
sauceyred wants to merge 14 commits from context-menu-ban-kick into main
3 changed files with 3 additions and 7 deletions
Showing only changes of commit f1eda2da75 - Show all commits

View file

@ -15,7 +15,7 @@ import type { ContextMenuInterface, GuildMemberResponse } from '~/types/interfac
const { getDisplayName } = useProfile()
const contextMenu = useState<ContextMenuInterface>("contextMenu", () => ({ show: false, pointerX: 0, pointerY: 0, items: [] }));
const contextMenu = useState<ContextMenuInterface>("contextMenu");
const props = defineProps<{
member: GuildMemberResponse

View file

@ -76,7 +76,7 @@ const route = useRoute();
const props = defineProps<MessageProps>();
const contextMenu = useState<ContextMenuInterface>("contextMenu", () => ({ show: false, pointerX: 0, pointerY: 0, items: [] }));
const contextMenu = useState<ContextMenuInterface>("contextMenu");
const messageElement = ref<HTMLDivElement>();

View file

@ -1,5 +1,5 @@
<template>
<div ref="resizableSidebar" class="resizable-sidebar"
<div ref="resizableSidebar" class="resizable-sidebar" @contextmenu="showContextMenu($event, contextMenu, menuItems)"
:style="{
'width': storedWidth ? storedWidth : props.width,
'min-width': props.minWidth,
@ -49,10 +49,6 @@ onMounted(() => {
if (resizableSidebar.value && widthResizer.value) {
widthResizer.value.addEventListener("pointerdown", (e) => {
e.preventDefault();
if (e.button == 2) {
showContextMenu(e, contextMenu.value, menuItems);
return
};
document.body.style.cursor = "ew-resize";
function handleMove(pointer: PointerEvent) {
if (resizableSidebar.value) {