This commit is contained in:
1 parent
891026ccbb
commit
adaae41e44
33 files changed
+2771
-396
No files matched your search
@@ -0,0 +1,23 @@
|
||||
<script lang="ts">
|
||||
import { AlertTriangle } from '@lucide/svelte';
|
||||
import { isRasterizationTooLarge, shouldWarnAboutRasterization } from '$lib/rasterization-limits';
|
||||
|
||||
type Props = { file: File | null };
|
||||
let { file }: Props = $props();
|
||||
</script>
|
||||
|
||||
{#if shouldWarnAboutRasterization(file)}
|
||||
<div
|
||||
class="flex gap-3 rounded-lg border p-4 text-sm {isRasterizationTooLarge(file)
|
||||
? 'border-red-200 bg-red-50 text-red-800'
|
||||
: 'border-amber-200 bg-amber-50 text-amber-800'}"
|
||||
role={isRasterizationTooLarge(file) ? 'alert' : undefined}
|
||||
>
|
||||
<AlertTriangle class="mt-0.5 h-5 w-5 shrink-0" />
|
||||
<p>
|
||||
{isRasterizationTooLarge(file)
|
||||
? 'Diese Datei ist größer als 100 MB und kann aus Speichergründen nicht im Browser gerastert werden.'
|
||||
: 'Diese große Datei benötigt beim Rasterisieren viel Arbeitsspeicher. Schließen Sie andere speicherintensive Tabs.'}
|
||||
</p>
|
||||
</div>
|
||||
{/if}
|
||||
Reference in new issue
Block a user