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: {
},
mountType() {
- return this.source._attributes['mount-type']
+ return this.source.attributes['mount-type']
},
},
*
*/
-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'
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)
return false
}
- this.$refs.actions.execDefaultAction(event)
+ const actions = this.$refs.actions as ComponentPublicInstance<typeof FileEntryActions>
+ actions.execDefaultAction(event)
},
openDetailsIfAvailable(event) {