web: fix type errors

This commit is contained in:
dumbmoron 2024-09-03 10:20:29 +00:00
parent cef90219e0
commit 38ce64b310
No known key found for this signature in database
3 changed files with 5 additions and 4 deletions

View file

@ -3,7 +3,7 @@
export let classes = "";
export let draggedOver = false;
export let file: File | undefined;
export let file: File | Blob | undefined;
const dropHandler = async (ev: DragEvent) => {
draggedOver = false;

View file

@ -5,7 +5,7 @@
import IconFileImport from "@tabler/icons-svelte/IconFileImport.svelte";
import IconUpload from "@tabler/icons-svelte/IconUpload.svelte";
export let file: File | undefined;
export let file: File | Blob | undefined;
export let draggedOver = false;
export let acceptTypes: string[];
export let acceptExtensions: string[];

View file

@ -8,11 +8,12 @@
let turnstileScript: HTMLElement;
onMount(() => {
if (!env.TURNSTILE_KEY) return;
const sitekey = env.TURNSTILE_KEY;
if (!sitekey) return;
turnstileScript.addEventListener("load", () => {
window.turnstile?.render(turnstileElement, {
sitekey: env.TURNSTILE_KEY,
sitekey,
"error-callback": (error) => {
console.log("turnstile error code:", error);
return true;