directory back up (parent) button + drag entry into parent to move
This commit is contained in:
@@ -27,7 +27,7 @@ if (warrenStore.current == null) {
|
||||
});
|
||||
}
|
||||
|
||||
const entries = useAsyncData(
|
||||
const dirData = useAsyncData(
|
||||
'current-directory',
|
||||
async () => {
|
||||
if (warrenStore.current == null) {
|
||||
@@ -37,7 +37,7 @@ const entries = useAsyncData(
|
||||
loadingIndicator.start();
|
||||
warrenStore.loading = true;
|
||||
|
||||
const entries = await getWarrenDirectory(
|
||||
const { files, parent } = await getWarrenDirectory(
|
||||
warrenStore.current.warrenId,
|
||||
warrenStore.current.path
|
||||
);
|
||||
@@ -45,7 +45,7 @@ const entries = useAsyncData(
|
||||
warrenStore.loading = false;
|
||||
loadingIndicator.finish();
|
||||
|
||||
return entries;
|
||||
return { files, parent };
|
||||
},
|
||||
{ watch: [warrenPath] }
|
||||
).data;
|
||||
@@ -80,12 +80,13 @@ function onDrop(files: File[] | null, e: DragEvent) {
|
||||
<div ref="dropZoneRef" class="grow">
|
||||
<DirectoryListContextMenu class="w-full grow">
|
||||
<DirectoryList
|
||||
v-if="entries != null"
|
||||
v-if="dirData != null"
|
||||
:is-over-drop-zone="
|
||||
dropZone.isOverDropZone.value &&
|
||||
dropZone.files.value != null
|
||||
"
|
||||
:entries="entries"
|
||||
:entries="dirData.files"
|
||||
:parent="dirData.parent"
|
||||
/>
|
||||
</DirectoryListContextMenu>
|
||||
<RenameEntryDialog />
|
||||
|
||||
Reference in New Issue
Block a user