UI: Botones de acción flotantes con position absolute
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 1m6s

- Botones ahora flotan fuera de la burbuja sin ocupar espacio
- Para mensajes propios: botones a la izquierda (right-full)
- Para mensajes recibidos: botones a la derecha (left-full)
- Agregado fondo y sombra a los botones para mejor visibilidad
This commit is contained in:
2025-12-03 10:26:45 -06:00
parent 8213864ad1
commit 5007049bcf

View File

@@ -12,14 +12,15 @@
{{ senderName }} {{ senderName }}
</span> </span>
<!-- Message container with action buttons --> <!-- Message bubble with floating action buttons -->
<div class="relative flex items-start gap-1" :class="message.fromMe ? 'flex-row-reverse' : 'flex-row'"> <div class="relative max-w-[70%]">
<!-- Action buttons (always on left side of bubble) --> <!-- Action buttons (floating, always on left side) -->
<div <div
class="flex gap-0.5 opacity-0 group-hover/message:opacity-100 transition-opacity pt-1" class="absolute z-10 flex gap-0.5 opacity-0 group-hover/message:opacity-100 transition-opacity"
:class="message.fromMe ? 'right-full mr-1 top-0' : 'left-full ml-1 top-0'"
> >
<button <button
class="p-1 rounded-full hover:bg-black/10 text-[var(--wa-text-muted)] hover:text-[var(--wa-text)]" class="p-1 rounded-full bg-[var(--wa-surface)] hover:bg-[var(--wa-bg-light)] text-[var(--wa-text-muted)] hover:text-[var(--wa-text)] shadow-sm"
title="Responder" title="Responder"
@click="$emit('reply', message)" @click="$emit('reply', message)"
> >
@@ -27,7 +28,7 @@
</button> </button>
<div class="relative"> <div class="relative">
<button <button
class="p-1 rounded-full hover:bg-black/10 text-[var(--wa-text-muted)] hover:text-[var(--wa-text)]" class="p-1 rounded-full bg-[var(--wa-surface)] hover:bg-[var(--wa-bg-light)] text-[var(--wa-text-muted)] hover:text-[var(--wa-text)] shadow-sm"
title="Reaccionar" title="Reaccionar"
@click.stop="showReactionPicker = !showReactionPicker" @click.stop="showReactionPicker = !showReactionPicker"
> >
@@ -41,7 +42,7 @@
/> />
</div> </div>
<button <button
class="p-1 rounded-full hover:bg-black/10 text-[var(--wa-text-muted)] hover:text-[var(--wa-text)]" class="p-1 rounded-full bg-[var(--wa-surface)] hover:bg-[var(--wa-bg-light)] text-[var(--wa-text-muted)] hover:text-[var(--wa-text)] shadow-sm"
title="Debug" title="Debug"
@click="showDebug = !showDebug" @click="showDebug = !showDebug"
> >
@@ -49,9 +50,9 @@
</button> </button>
</div> </div>
<!-- Message bubble --> <!-- Message bubble content -->
<div <div
class="relative max-w-[70%] rounded-lg overflow-hidden" class="rounded-lg overflow-hidden"
:class="bubbleClass" :class="bubbleClass"
@contextmenu.prevent="showReactionPicker = true" @contextmenu.prevent="showReactionPicker = true"
@touchstart="onTouchStart" @touchstart="onTouchStart"