From 44483bb9aeb7fbb79bc8ba0605b5e1ed2ba9a993 Mon Sep 17 00:00:00 2001 From: naskya Date: Sun, 21 Jul 2024 19:13:23 +0900 Subject: [PATCH] fix (client): do not refresh the page on showAttachedNotes (closes #10969) --- packages/client/src/components/MkDrive.file.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/client/src/components/MkDrive.file.vue b/packages/client/src/components/MkDrive.file.vue index 6d348a33e7..1e83fc0257 100644 --- a/packages/client/src/components/MkDrive.file.vue +++ b/packages/client/src/components/MkDrive.file.vue @@ -48,6 +48,7 @@ import { i18n } from "@/i18n"; import { me } from "@/me"; import icon from "@/scripts/icon"; import type { MenuItem } from "@/types/menu"; +import { useRouter } from "@/router"; const props = withDefaults( defineProps<{ @@ -67,6 +68,8 @@ const emit = defineEmits<{ (ev: "dragend"): void; }>(); +const router = useRouter(); + const isDragging = ref(false); const title = computed( @@ -107,10 +110,11 @@ function getMenu(): MenuItem[] { download: props.file.name, }, { - type: "a", - href: `/my/drive/file/${props.file.id}/attached`, text: i18n.ts.showAttachedNotes, icon: `${icon("ph-paperclip")}`, + action: () => { + router.push(`/my/drive/file/${props.file.id}/attached`); + }, }, null, {