file upload drop zones

This commit is contained in:
2025-07-29 21:17:39 +02:00
parent 45368dcc9a
commit b1409b44d1
5 changed files with 162 additions and 66 deletions

View File

@@ -1,8 +1,10 @@
<script setup lang="ts">
import { ScrollArea } from '@/components/ui/scroll-area';
import type { DirectoryEntry } from '#shared/types';
const { entries } = defineProps<{
const { entries, isOverDropZone } = defineProps<{
entries: DirectoryEntry[];
isOverDropZone?: boolean;
}>();
const { isLoading } = useLoadingIndicator();
@@ -14,6 +16,12 @@ const sortedEntries = computed(() =>
<template>
<ScrollArea class="h-full w-full">
<div
v-if="isOverDropZone"
class="bg-background/50 pointer-events-none absolute flex h-full w-full items-center justify-center"
>
<Icon class="size-16 animate-pulse" name="lucide:upload" />
</div>
<div class="flex flex-row flex-wrap gap-2">
<DirectoryEntry
v-for="entry in sortedEntries"