mirror of
https://github.com/45Drives/cockpit-navigator.git
synced 2025-07-29 16:45:13 +02:00
use entryAction in place of cd and edit
This commit is contained in:
parent
52d216b0f7
commit
3d0322c6e3
@ -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',
|
||||
|
@ -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',
|
||||
|
@ -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',
|
||||
]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user