login hcaptcha

This commit is contained in:
elvira
2026-09-25 16:19:56 +03:00
parent d43b615297
commit 3347febb3c
7 changed files with 118 additions and 16 deletions
+17
View File
@@ -6,6 +6,11 @@
<meta name="robots" content="noindex, follow">
@endpush
{{-- Only on pages with a captcha, not in the global layout. --}}
@push('scripts')
<script src="https://js.hcaptcha.com/1/api.js?hl={{ app()->getLocale() }}" async defer></script>
@endpush
@section('content')
<section class="mx-auto max-w-2xl px-4 py-20 sm:px-8 sm:py-32">
@@ -52,6 +57,18 @@
]) !!}
</p>
{{-- hCaptcha checkbox, verified by App\Rules\HCaptcha. The widget adds
the `h-captcha-response` field itself. Fixed height reserves the
iframe's space so the button doesn't jump when it loads. --}}
<x-ui.field for="login-captcha" :error="$errors->first('h-captcha-response')">
<div
id="login-captcha"
class="h-captcha min-h-[78px]"
data-sitekey="{{ config('services.hcaptcha.sitekey') }}"
@if ($errors->has('h-captcha-response')) aria-describedby="login-captcha-error" @endif
></div>
</x-ui.field>
<div>
<x-ui.button type="submit">{{ __('storefront.auth.send_code') }}</x-ui.button>
</div>
+1 -1
View File
@@ -270,7 +270,7 @@ class="flex flex-col gap-6"
@if(!empty($product['recommendations']))
<x-product-grid
class="mt-20"
title="Σχετικά προϊόντα"
:title="__('storefront.product.related')"
:products="collect($product['recommendations'])->map(fn (array $recommendation) => [
'name' => $recommendation['name'],
'price' => $recommendation['price'],