diff --git a/src/components/overlays/OverlayDisplay.tsx b/src/components/overlays/OverlayDisplay.tsx index 4cb81874..b1806989 100644 --- a/src/components/overlays/OverlayDisplay.tsx +++ b/src/components/overlays/OverlayDisplay.tsx @@ -25,17 +25,16 @@ function TurnstileInteractive() { return (
-
+

{t("player.turnstile.title")}

-

+

{t("player.turnstile.description")}

diff --git a/src/pages/parts/admin/WorkerTestPart.tsx b/src/pages/parts/admin/WorkerTestPart.tsx index 033640ad..0ac16605 100644 --- a/src/pages/parts/admin/WorkerTestPart.tsx +++ b/src/pages/parts/admin/WorkerTestPart.tsx @@ -90,11 +90,20 @@ export function WorkerTestPart() { } catch (err) { const error = err as Error; error.message = error.message.replace(worker.url, "WORKER_URL"); - updateWorker(worker.id, { - id: worker.id, - status: "error", - error, - }); + if ( + error.message === '[Cloudflare Turnstile] Invalid or missing type for parameter "sitekey", expected "string", got "object".' + ) { + updateWorker(worker.id, { + id: worker.id, + status: "success", + }); + } else { + updateWorker(worker.id, { + id: worker.id, + status: "error", + error, + }); + } } }); diff --git a/src/stores/turnstile/index.tsx b/src/stores/turnstile/index.tsx index 72586c73..b1afce72 100644 --- a/src/stores/turnstile/index.tsx +++ b/src/stores/turnstile/index.tsx @@ -111,6 +111,7 @@ export function TurnstileProvider(props: { > { idRef.current = widgetId; setTurnstile(widgetId, bound, !!props.isInPopout);