Update TradeModal.svelte
This commit is contained in:
parent
9a99f934b6
commit
519236913e
1 changed files with 26 additions and 25 deletions
|
|
@ -213,31 +213,32 @@
|
|||
</Badge>
|
||||
{/if}
|
||||
|
||||
<div>
|
||||
<Turnstile
|
||||
siteKey={PUBLIC_TURNSTILE_SITE_KEY}
|
||||
theme="auto"
|
||||
size="normal"
|
||||
bind:reset={turnstileReset}
|
||||
on:callback={(e: CustomEvent<{ token: string }>) => {
|
||||
turnstileToken = e.detail.token;
|
||||
turnstileError = '';
|
||||
}}
|
||||
on:error={(e: CustomEvent<{ code: string }>) => {
|
||||
turnstileToken = '';
|
||||
turnstileError = e.detail.code || 'Captcha error';
|
||||
}}
|
||||
on:expired={() => {
|
||||
turnstileToken = '';
|
||||
turnstileError = 'Captcha expired';
|
||||
}}
|
||||
execution="render"
|
||||
appearance="always"
|
||||
/>
|
||||
{#if turnstileError}
|
||||
<p class="text-destructive mt-1 text-xs">{turnstileError}</p>
|
||||
{/if}
|
||||
</div>
|
||||
{#if showCaptcha}
|
||||
<div>
|
||||
<Turnstile
|
||||
siteKey={PUBLIC_TURNSTILE_SITE_KEY}
|
||||
theme="auto"
|
||||
size="normal"
|
||||
bind:reset={turnstileReset}
|
||||
on:callback={(e: CustomEvent<{ token: string }>) => {
|
||||
turnstileToken = e.detail.token;
|
||||
turnstileError = '';
|
||||
}}
|
||||
on:error={(e: CustomEvent<{ code: string }>) => {
|
||||
turnstileToken = '';
|
||||
turnstileError = e.detail.code || 'Captcha error';
|
||||
}}
|
||||
on:expired={() => {
|
||||
turnstileToken = '';
|
||||
turnstileError = 'Captcha expired';
|
||||
}}
|
||||
execution="render"
|
||||
appearance="always"
|
||||
/>
|
||||
{#if turnstileError}
|
||||
<p class="text-destructive mt-1 text-xs">{turnstileError}</p>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Reference in a new issue