From 6ad8fd3d4f3bb753ae64742e3461563abfb07802 Mon Sep 17 00:00:00 2001 From: mattyatea Date: Wed, 11 Oct 2023 06:19:14 +0900 Subject: [PATCH] bugfix --- packages/frontend/src/components/MkDrive.file.vue | 4 ++-- packages/frontend/src/components/MkDrive.vue | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/components/MkDrive.file.vue b/packages/frontend/src/components/MkDrive.file.vue index b3c5e57455..d5e9001189 100644 --- a/packages/frontend/src/components/MkDrive.file.vue +++ b/packages/frontend/src/components/MkDrive.file.vue @@ -78,7 +78,7 @@ watch(props.SelectFiles, () => { }); function onClick(ev: MouseEvent) { - ('onclick'); + if (props.selectMode) { emit('chosen', props.file); } else if (!ev.shiftKey && !isTouchUsing && !isSelectedFile.value) { @@ -93,7 +93,7 @@ function onClick(ev: MouseEvent) { } function onContextmenu(ev: MouseEvent) { - ('oncontext'); + if (!isTouchUsing) { if (!ev.shiftKey && !isSelectedFile.value) { os.contextMenu(getDriveFileMenu(props.file, props.folder), ev); diff --git a/packages/frontend/src/components/MkDrive.vue b/packages/frontend/src/components/MkDrive.vue index 875c450201..20bda88078 100644 --- a/packages/frontend/src/components/MkDrive.vue +++ b/packages/frontend/src/components/MkDrive.vue @@ -22,6 +22,7 @@ SPDX-License-Identifier: AGPL-3.0-only :folder="f" :parentFolder="folder" :class="[$style.navPathItem]" + :selectedFiles="selectedFiles" @move="move" @upload="upload" @removeFile="removeFile" @@ -87,6 +88,7 @@ SPDX-License-Identifier: AGPL-3.0-only :file="file" :folder="folder" :selectMode="select === 'file'" + :SelectFiles="selectedFiles" :isSelected="selectedFiles.some(x => x.id === file.id)" @click.shift.left.exact="filesSelect" @chosen="chooseFile"