web/Omnibox: show a spinner when loading

replaces the link icon with a spinner when loading the turnstile checks or processing the link
This commit is contained in:
wukko
2024-08-16 01:37:05 +06:00
parent 8b9e3f58f4
commit 478dd6e515
3 changed files with 41 additions and 6 deletions

View File

@ -2,6 +2,8 @@
import env from "$lib/env";
import { onMount } from "svelte";
import { turnstileLoaded } from "$lib/state/turnstile";
let turnstileElement: HTMLElement;
let turnstileScript: HTMLElement;
@ -15,6 +17,9 @@
console.log("turnstile error code:", error);
return true;
},
callback: () => {
$turnstileLoaded = true;
}
});
});
});