web: fix type errors
This commit is contained in:
parent
cef90219e0
commit
38ce64b310
3 changed files with 5 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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[];
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue