open-webui/src/lib/components/AddFilesPlaceholder.svelte

28 lines
518 B
Svelte
Raw Normal View History

<script>
import { getContext } from 'svelte';
2024-10-02 14:44:07 +00:00
export let title = '';
2024-10-09 07:13:54 +00:00
export let content = '';
const i18n = getContext('i18n');
</script>
2024-10-09 07:13:54 +00:00
<div class="px-3">
2025-09-12 20:37:45 +00:00
<div class="text-center dark:text-white text-2xl font-medium z-50">
2024-10-09 07:13:54 +00:00
{#if title}
{title}
{:else}
{$i18n.t('Add Files')}
{/if}
2024-02-01 21:17:47 +00:00
</div>
2024-10-09 07:13:54 +00:00
<slot
2025-09-12 20:37:45 +00:00
><div class="px-2 mt-2 text-center text-gray-700 dark:text-gray-200 w-full">
2024-10-09 07:13:54 +00:00
{#if content}
{content}
{:else}
2025-05-03 19:47:41 +00:00
{$i18n.t('Drop any files here to upload')}
2024-10-09 07:13:54 +00:00
{/if}
</div>
</slot>
</div>