From c7c52df7431e7ea4feaf396b0002fbf1059a2bfd Mon Sep 17 00:00:00 2001 From: Lizandro Date: Wed, 29 Jul 2026 20:52:49 +0000 Subject: [PATCH] feat: preview de imagen y doble indicador de carga al subir comprobante MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Muestra thumbnail de la imagen seleccionada inmediatamente (FileReader) con spinner superpuesto mientras Livewire sube el archivo - wire:loading wire:target="fotoComprobante" muestra "Analizando con IA..." durante la ejecución del método en el servidor (Gemini puede tardar 10-30s) - La preview desaparece al terminar la subida Co-Authored-By: Claude Sonnet 4.6 --- .../views/livewire/chat/public-chat.blade.php | 39 ++++++++++++++++--- 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/resources/views/livewire/chat/public-chat.blade.php b/resources/views/livewire/chat/public-chat.blade.php index 0f328c5..cf61d73 100755 --- a/resources/views/livewire/chat/public-chat.blade.php +++ b/resources/views/livewire/chat/public-chat.blade.php @@ -161,10 +161,10 @@ {{-- ══ PASO 3: Interfaz de chat ══ --}} @else
+ @livewire-upload-finish.window="uploading = false; previewUrl = null" + @livewire-upload-error.window="uploading = false; previewUrl = null" {{-- Header --}}
@@ -617,8 +617,23 @@ {{-- Input + upload --}} @if ($estadoConv !== 'cerrada')
- {{-- Indicador subiendo / analizando imagen --}} -
+ {{-- Preview local de la imagen seleccionada --}} + + {{-- Indicador: subiendo archivo (fase Alpine) --}} +
@@ -627,10 +642,22 @@ Subiendo imagen...
+ {{-- Indicador: analizando con IA (fase Livewire server) --}} +
+
+ + + + + Analizando comprobante con IA... +
+
{{-- Botón adjuntar foto --}}