diff options
-rw-r--r-- | apps/files/src/components/FileEntry/FileEntryActions.vue | 10 | ||||
-rw-r--r-- | apps/files/src/components/FileEntryMixin.ts | 6 |
2 files changed, 9 insertions, 7 deletions
diff --git a/apps/files/src/components/FileEntry/FileEntryActions.vue b/apps/files/src/components/FileEntry/FileEntryActions.vue index cc9413cf413..21d5cd9e796 100644 --- a/apps/files/src/components/FileEntry/FileEntryActions.vue +++ b/apps/files/src/components/FileEntry/FileEntryActions.vue @@ -211,12 +211,12 @@ export default defineComponent({ return this.enabledActions .filter(action => action.parent) .reduce((arr, action) => { - if (!arr[action.parent]) { - arr[action.parent] = [] + if (!arr[action.parent!]) { + arr[action.parent!] = [] } - arr[action.parent].push(action) + arr[action.parent!].push(action) return arr - }, {} as Record<string, FileAction>) + }, {} as Record<string, FileAction[]>) }, openedMenu: { @@ -238,7 +238,7 @@ export default defineComponent({ }, mountType() { - return this.source._attributes['mount-type'] + return this.source.attributes['mount-type'] }, }, diff --git a/apps/files/src/components/FileEntryMixin.ts b/apps/files/src/components/FileEntryMixin.ts index f91bd4e540f..b1f564cdd4b 100644 --- a/apps/files/src/components/FileEntryMixin.ts +++ b/apps/files/src/components/FileEntryMixin.ts @@ -3,7 +3,7 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ -import type { PropType } from 'vue' +import type { ComponentPublicInstance, PropType } from 'vue' import { showError } from '@nextcloud/dialogs' import { FileType, Permission, Folder, File as NcFile, NodeStatus, Node, View } from '@nextcloud/files' @@ -18,6 +18,7 @@ import { getDragAndDropPreview } from '../utils/dragUtils.ts' import { hashCode } from '../utils/hashUtils.ts' import { dataTransferToFileTree, onDropExternalFiles, onDropInternalFiles } from '../services/DropService.ts' import logger from '../logger.js' +import FileEntryActions from '../components/FileEntry/FileEntryActions.vue' Vue.directive('onClickOutside', vOnClickOutside) @@ -212,7 +213,8 @@ export default defineComponent({ return false } - this.$refs.actions.execDefaultAction(event) + const actions = this.$refs.actions as ComponentPublicInstance<typeof FileEntryActions> + actions.execDefaultAction(event) }, openDetailsIfAvailable(event) { |