use entryAction in place of cd and edit

This commit is contained in:
joshuaboud 2022-06-15 17:34:22 -03:00
parent 52d216b0f7
commit 3d0322c6e3
No known key found for this signature in database
GPG Key ID: 17EFB59E2A8BF50E
3 changed files with 3 additions and 11 deletions

View File

@ -54,7 +54,6 @@
</tr>
<component :is="DirectoryEntryList" v-if="directoryLike && showEntries" :host="host" :path="entry.path"
:isChild="true" :sortCallback="inheritedSortCallback" :searchFilterRegExp="searchFilterRegExp"
@cd="(...args) => $emit('cd', ...args)" @edit="(...args) => $emit('edit', ...args)"
@startProcessing="(...args) => $emit('startProcessing', ...args)"
@stopProcessing="(...args) => $emit('stopProcessing', ...args)" @cancelShowEntries="showEntries = false"
ref="directoryEntryListRef" :level="level + 1" :selectedCount="selectedCount"
@ -129,7 +128,7 @@ export default {
const doubleClickCallback = () => {
if (directoryLike.value) {
emit('cd', props.entry.path);
emit('entryAction', 'cd', props.entry);
} else {
emit('entryAction', 'openPrompt', props.entry);
}
@ -187,8 +186,6 @@ export default {
ChevronUpIcon,
},
emits: [
'cd',
'edit',
'toggleSelected',
'startProcessing',
'stopProcessing',

View File

@ -1,7 +1,6 @@
<template>
<DirectoryEntry v-for="entry, index in visibleEntries" :key="entry.path" :host="host" :entry="entry"
:inheritedSortCallback="sortCallback" :searchFilterRegExp="searchFilterRegExp"
@cd="(...args) => $emit('cd', ...args)" @edit="(...args) => $emit('edit', ...args)"
@toggleSelected="(...args) => $emit('toggleSelected', ...args)" @sortEntries="sortEntries"
@startProcessing="(...args) => $emit('startProcessing', ...args)"
@stopProcessing="(...args) => $emit('stopProcessing', ...args)" ref="entryRefs" :level="level" :selectedCount="selectedCount"
@ -271,8 +270,6 @@ export default {
DirectoryEntry,
},
emits: [
'cd',
'edit',
'startProcessing',
'stopProcessing',
'cancelShowEntries',

View File

@ -106,8 +106,8 @@
<div :key="host + path" class="flex flex-wrap bg-well h-full overflow-y-auto content-start" ref="gridRef"
@wheel="scrollHandler">
<DirectoryEntryList :host="host" :path="path" :sortCallback="sortCallback"
:searchFilterRegExp="searchFilterRegExp" @cd="(...args) => $emit('cd', ...args)"
@edit="(...args) => $emit('edit', ...args)" @toggleSelected="toggleSelected"
:searchFilterRegExp="searchFilterRegExp"
@toggleSelected="toggleSelected"
@startProcessing="processing++" @stopProcessing="processing--"
@entryAction="(...args) => $emit('entryAction', ...args)" ref="directoryEntryListRef"
:level="0" :cols="cols" :selectedCount="selectedCount" />
@ -344,8 +344,6 @@ export default {
DragSelectArea,
},
emits: [
'cd',
'edit',
'entryAction',
]
}