From c3f9984a9defaa10daad9492fc24729d22b8de71 Mon Sep 17 00:00:00 2001 From: Lizandro Date: Sat, 18 Jul 2026 19:27:17 +0000 Subject: [PATCH] =?UTF-8?q?feat(chat):=20men=C3=BA=20tres=20puntos=20con?= =?UTF-8?q?=20Limpiar=20chat=20y=20Cerrar=20sesi=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Reemplaza botón suelto de logout por dropdown (Alpine.js) con dos opciones - limpiarChat(): limpia mensajes visibles y cierra conversación actual - cerrarSesion(): ya existía, se mantiene igual - Cierra el dropdown al hacer clic fuera (x-click.outside) Co-Authored-By: Claude Sonnet 4.6 --- app/Http/Livewire/Chat/PublicChat.php | 10 ++++++ .../views/livewire/chat/public-chat.blade.php | 36 +++++++++++++++---- 2 files changed, 39 insertions(+), 7 deletions(-) mode change 100644 => 100755 resources/views/livewire/chat/public-chat.blade.php diff --git a/app/Http/Livewire/Chat/PublicChat.php b/app/Http/Livewire/Chat/PublicChat.php index 68cca8e..e5eb28f 100755 --- a/app/Http/Livewire/Chat/PublicChat.php +++ b/app/Http/Livewire/Chat/PublicChat.php @@ -191,6 +191,16 @@ class PublicChat extends Component ]); } + public function limpiarChat(): void + { + // Cierra la conversación actual y abre una nueva en la próxima interacción + $this->mensajes = []; + $this->convId = null; + $this->flujo = ''; + $this->flujoData = []; + session()->forget('chat_conv_id'); + } + public function cerrarSesion(): void { session()->forget(['chat_user_id', 'chat_conv_id']); diff --git a/resources/views/livewire/chat/public-chat.blade.php b/resources/views/livewire/chat/public-chat.blade.php old mode 100644 new mode 100755 index 81b63bb..424d6c8 --- a/resources/views/livewire/chat/public-chat.blade.php +++ b/resources/views/livewire/chat/public-chat.blade.php @@ -182,13 +182,35 @@

${{ number_format($saldoUsuario) }}

@endif - {{-- Cerrar sesión --}} - + {{-- Menú de opciones --}} +
+ +
+ +
+ +
+