Fix: Corregir bugs en interfaz de mensajes
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 1m8s
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 1m8s
- Corregir modal de imagen vacío (agregar template #default a UModal) - Agregar soporte para click derecho y long press en selector de reacciones - Agregar fondo sólido al card de reacciones (bg-[var(--wa-surface)])
This commit is contained in:
@@ -15,6 +15,10 @@
|
|||||||
<div
|
<div
|
||||||
class="relative max-w-[70%] rounded-lg overflow-hidden"
|
class="relative max-w-[70%] rounded-lg overflow-hidden"
|
||||||
:class="bubbleClass"
|
:class="bubbleClass"
|
||||||
|
@contextmenu.prevent="showReactionPicker = true"
|
||||||
|
@touchstart="onTouchStart"
|
||||||
|
@touchend="onTouchEnd"
|
||||||
|
@touchmove="onTouchEnd"
|
||||||
>
|
>
|
||||||
<!-- Quoted message -->
|
<!-- Quoted message -->
|
||||||
<div v-if="message.quoted" class="px-2 pt-2">
|
<div v-if="message.quoted" class="px-2 pt-2">
|
||||||
@@ -235,6 +239,22 @@ const emit = defineEmits<{
|
|||||||
const showDebug = ref(false)
|
const showDebug = ref(false)
|
||||||
const showReactionPicker = ref(false)
|
const showReactionPicker = ref(false)
|
||||||
|
|
||||||
|
// Long press timer for mobile
|
||||||
|
let longPressTimer: ReturnType<typeof setTimeout> | null = null
|
||||||
|
|
||||||
|
const onTouchStart = () => {
|
||||||
|
longPressTimer = setTimeout(() => {
|
||||||
|
showReactionPicker.value = true
|
||||||
|
}, 500) // 500ms long press
|
||||||
|
}
|
||||||
|
|
||||||
|
const onTouchEnd = () => {
|
||||||
|
if (longPressTimer) {
|
||||||
|
clearTimeout(longPressTimer)
|
||||||
|
longPressTimer = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Handle reaction selection
|
// Handle reaction selection
|
||||||
const handleReaction = (emoji: string) => {
|
const handleReaction = (emoji: string) => {
|
||||||
emit('react', props.message, emoji)
|
emit('react', props.message, emoji)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
v-if="visible"
|
v-if="visible"
|
||||||
class="absolute z-50 bg-[var(--wa-bg-dark)] rounded-full shadow-lg border border-[var(--wa-border)] p-1 flex items-center gap-1"
|
class="absolute z-50 bg-[var(--wa-surface)] rounded-full shadow-lg border border-[var(--wa-border)] p-1 flex items-center gap-1"
|
||||||
:class="position === 'top' ? 'bottom-full mb-2' : 'top-full mt-2'"
|
:class="position === 'top' ? 'bottom-full mb-2' : 'top-full mt-2'"
|
||||||
@click.stop
|
@click.stop
|
||||||
>
|
>
|
||||||
@@ -24,8 +24,9 @@
|
|||||||
|
|
||||||
<!-- Full emoji picker modal -->
|
<!-- Full emoji picker modal -->
|
||||||
<UModal v-model="showFullPicker">
|
<UModal v-model="showFullPicker">
|
||||||
<div class="p-4">
|
<template #default>
|
||||||
<h3 class="text-lg font-semibold mb-4 text-[var(--wa-text)]">Elegir reacción</h3>
|
<div class="p-4 bg-[var(--wa-surface)]">
|
||||||
|
<h3 class="text-lg font-semibold mb-4 text-[var(--wa-text)]">Elegir reaccion</h3>
|
||||||
|
|
||||||
<div class="grid grid-cols-8 gap-2 max-h-64 overflow-y-auto">
|
<div class="grid grid-cols-8 gap-2 max-h-64 overflow-y-auto">
|
||||||
<button
|
<button
|
||||||
@@ -44,6 +45,7 @@
|
|||||||
</UButton>
|
</UButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
</UModal>
|
</UModal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -89,8 +89,10 @@
|
|||||||
|
|
||||||
<!-- Fullscreen modal -->
|
<!-- Fullscreen modal -->
|
||||||
<UModal v-model="showFullscreen" :ui="{ width: 'max-w-[95vw]' }">
|
<UModal v-model="showFullscreen" :ui="{ width: 'max-w-[95vw]' }">
|
||||||
|
<template #default>
|
||||||
<div class="relative bg-black flex items-center justify-center min-h-[50vh]">
|
<div class="relative bg-black flex items-center justify-center min-h-[50vh]">
|
||||||
<img
|
<img
|
||||||
|
v-if="showFullscreen"
|
||||||
:src="imageUrl"
|
:src="imageUrl"
|
||||||
:alt="'Imagen'"
|
:alt="'Imagen'"
|
||||||
class="max-w-full max-h-[90vh] object-contain"
|
class="max-w-full max-h-[90vh] object-contain"
|
||||||
@@ -108,6 +110,7 @@
|
|||||||
<UIcon name="i-lucide-download" class="w-6 h-6" />
|
<UIcon name="i-lucide-download" class="w-6 h-6" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
</UModal>
|
</UModal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user