basic selection + download multiple files with selection
This commit is contained in:
@@ -7,15 +7,17 @@ const {
|
||||
parent,
|
||||
isOverDropZone,
|
||||
disableEntries = false,
|
||||
entriesDraggable = true,
|
||||
} = defineProps<{
|
||||
entries: DirectoryEntry[];
|
||||
parent: DirectoryEntry | null;
|
||||
isOverDropZone?: boolean;
|
||||
disableEntries?: boolean;
|
||||
entriesDraggable?: boolean;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
'entry-click': [entry: DirectoryEntry];
|
||||
'entry-click': [entry: DirectoryEntry, event: MouseEvent];
|
||||
'entry-download': [entry: DirectoryEntry];
|
||||
back: [];
|
||||
}>();
|
||||
@@ -26,8 +28,8 @@ const sortedEntries = computed(() =>
|
||||
entries.toSorted((a, b) => a.name.localeCompare(b.name))
|
||||
);
|
||||
|
||||
function onEntryClicked(entry: DirectoryEntry) {
|
||||
emit('entry-click', entry);
|
||||
function onEntryClicked(entry: DirectoryEntry, event: MouseEvent) {
|
||||
emit('entry-click', entry, event);
|
||||
}
|
||||
|
||||
function onEntryDownload(entry: DirectoryEntry) {
|
||||
@@ -56,6 +58,7 @@ function onEntryDownload(entry: DirectoryEntry) {
|
||||
:key="entry.name"
|
||||
:entry="entry"
|
||||
:disabled="isLoading || disableEntries"
|
||||
:draggable="entriesDraggable"
|
||||
@entry-click="onEntryClicked"
|
||||
@entry-download="onEntryDownload"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user