enhance: allow longpress and contextmenu copy paste

This commit is contained in:
Julian Krauser 2025-07-22 07:50:26 +02:00
parent 518e05b842
commit e755a4ec37
7 changed files with 144 additions and 18 deletions

View file

@ -3,21 +3,15 @@
ref="contextMenu"
class="absolute inset-0 w-full h-full flex justify-center items-center bg-black/50 select-none z-50 p-2"
v-show="show"
@contextmenu.prevent
>
<!-- @click="closeModal" -->
<component
:is="component_ref"
:data="data"
@click.stop
class="p-4 bg-white rounded-lg max-h-[95%] overflow-y-auto"
/>
<component :is="component_ref" :data="data" class="p-4 bg-white rounded-lg max-h-[95%] overflow-y-auto" />
</div>
</template>
<script setup lang="ts">
import { mapState, mapActions } from "pinia";
import { useModalStore } from "@/stores/modal";
import { useContextMenuStore } from "@/stores/context-menu";
</script>
<script lang="ts">
@ -27,6 +21,7 @@ export default {
},
methods: {
...mapActions(useModalStore, ["closeModal"]),
...mapActions(useContextMenuStore, ["closeContextMenu"]),
},
};
</script>