mirror of
https://github.com/wukko/cobalt.git
synced 2025-01-24 03:36:22 +01:00
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 classes = "";
|
||||||
|
|
||||||
export let draggedOver = false;
|
export let draggedOver = false;
|
||||||
export let file: File | undefined;
|
export let file: File | Blob | undefined;
|
||||||
|
|
||||||
const dropHandler = async (ev: DragEvent) => {
|
const dropHandler = async (ev: DragEvent) => {
|
||||||
draggedOver = false;
|
draggedOver = false;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
import IconFileImport from "@tabler/icons-svelte/IconFileImport.svelte";
|
import IconFileImport from "@tabler/icons-svelte/IconFileImport.svelte";
|
||||||
import IconUpload from "@tabler/icons-svelte/IconUpload.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 draggedOver = false;
|
||||||
export let acceptTypes: string[];
|
export let acceptTypes: string[];
|
||||||
export let acceptExtensions: string[];
|
export let acceptExtensions: string[];
|
||||||
|
|
|
@ -8,11 +8,12 @@
|
||||||
let turnstileScript: HTMLElement;
|
let turnstileScript: HTMLElement;
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
if (!env.TURNSTILE_KEY) return;
|
const sitekey = env.TURNSTILE_KEY;
|
||||||
|
if (!sitekey) return;
|
||||||
|
|
||||||
turnstileScript.addEventListener("load", () => {
|
turnstileScript.addEventListener("load", () => {
|
||||||
window.turnstile?.render(turnstileElement, {
|
window.turnstile?.render(turnstileElement, {
|
||||||
sitekey: env.TURNSTILE_KEY,
|
sitekey,
|
||||||
"error-callback": (error) => {
|
"error-callback": (error) => {
|
||||||
console.log("turnstile error code:", error);
|
console.log("turnstile error code:", error);
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue