drag-and-drop-upload-overlay.svelte 736 B

1234567891011121314151617181920
  1. <script lang="ts">
  2. import { fade } from 'svelte/transition';
  3. import ImmichLogo from './immich-logo.svelte';
  4. export let dropHandler: (event: DragEvent) => void;
  5. export let dragOverHandler: (event: DragEvent) => void;
  6. export let dragLeaveHandler: () => void;
  7. </script>
  8. <div
  9. in:fade={{ duration: 250 }}
  10. out:fade={{ duration: 250 }}
  11. on:drop={dropHandler}
  12. on:dragover={dragOverHandler}
  13. on:dragleave={dragLeaveHandler}
  14. class="fixed inset-0 w-full h-full z-[1000] flex flex-col items-center justify-center bg-gray-100/90 dark:bg-immich-dark-bg/90 text-immich-dark-gray dark:text-immich-gray"
  15. >
  16. <ImmichLogo height="200" width="200" class="animate-bounce pb-16" />
  17. <div class="text-2xl">Drop files anywhere to upload</div>
  18. </div>