diff --git a/SharpbinV3.Client/src/routes/register/+page.svelte b/SharpbinV3.Client/src/routes/register/+page.svelte index a35ba3d..e9f9ee6 100644 --- a/SharpbinV3.Client/src/routes/register/+page.svelte +++ b/SharpbinV3.Client/src/routes/register/+page.svelte @@ -28,7 +28,11 @@ onMount(() => { const render = () => { - if (window.turnstile && data.options?.cf_turnstile_site_key) { + if ( + window.turnstile && + data.options?.cf_turnstile_site_key && + data.options?.registration_enabled + ) { window.turnstile.render('.cf-turnstile', { sitekey: data.options.cf_turnstile_site_key, theme: 'dark' @@ -103,6 +107,13 @@ >

Register

+ {#if data.options?.registration_enabled === false} +
+ Registration is currently disabled. +
+ {/if}
@@ -118,6 +130,7 @@ placeholder="Email (optional)" bind:value={email} autocomplete="email" + disabled={loading || !data.options?.registration_enabled} class="focus:bg-neutral-750 w-full rounded border border-neutral-700 bg-neutral-800 p-2 placeholder-neutral-500 transition-colors duration-200 focus:border-neutral-600" />
@@ -127,6 +140,7 @@ placeholder="Display Name (optional)" bind:value={displayName} autocomplete="name" + disabled={loading || !data.options?.registration_enabled} class="focus:bg-neutral-750 w-full rounded border border-neutral-700 bg-neutral-800 p-2 placeholder-neutral-500 transition-colors duration-200 focus:border-neutral-600" />
@@ -138,9 +152,10 @@ on:focus={() => (passwordFocused = true)} on:blur={() => (passwordFocused = false)} autocomplete="new-password" + disabled={loading || !data.options?.registration_enabled} class="focus:bg-neutral-750 w-full rounded border border-neutral-700 bg-neutral-800 p-2 placeholder-neutral-500 transition-colors duration-200 focus:border-neutral-600" /> - {#if passwordFocused} + {#if passwordFocused && !data.options?.registration_enabled}