Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,26 @@
</AvatarFallback>
</Avatar>
</div>
<!-- Selection gates every bulk action, and a hover-only target is
unreachable on touch. On touch the overlay is always live, so
tapping the avatar selects; the checkbox itself only becomes
visible once selection is under way, leaving the avatar
readable until then. -->
<div
v-if="canBulkAct"
class="absolute inset-0 items-center justify-center"
:class="showCheckbox ? 'flex' : 'hidden group-hover:flex'"
class="absolute inset-0 items-center justify-center flex"
:class="showCheckbox ? '' : '[@media(hover:hover)]:hidden [@media(hover:hover)]:group-hover:flex'"
@click.prevent.stop="handleCheckboxClick"
>
<Checkbox
:checked="isItemSelected"
:aria-label="t('conversation.bulkActions.selectConversation')"
class="w-5 h-5"
:class="
showCheckbox
? ''
: 'opacity-0 focus-visible:opacity-100 [@media(hover:hover)]:opacity-100'
"
/>
</div>
</div>
Expand Down Expand Up @@ -279,7 +289,8 @@ const showCheckbox = computed(() => {

const avatarOpacityClass = computed(() => {
if (showCheckbox.value) return 'opacity-0'
if (canBulkAct.value) return 'opacity-100 group-hover:opacity-0'
// Only fade the avatar for the checkbox on devices that can actually hover.
if (canBulkAct.value) return 'opacity-100 [@media(hover:hover)]:group-hover:opacity-0'
return 'opacity-100'
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@error="fallbackToOriginal($event, attachment.url)"
/>
<div
class="absolute inset-x-0 top-0 flex items-start justify-between gap-2 px-2 pt-1.5 pb-5 bg-gradient-to-b from-black/75 via-black/40 to-transparent opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none"
class="absolute inset-x-0 top-0 flex items-start justify-between gap-2 px-2 pt-1.5 pb-5 bg-gradient-to-b from-black/75 via-black/40 to-transparent transition-opacity pointer-events-none [@media(hover:hover)]:opacity-0 [@media(hover:hover)]:group-hover:opacity-100"
>
<div class="min-w-0 flex-1 text-white image-meta">
<p class="font-medium text-xs truncate">{{ shortName(attachment.name) }}</p>
Expand Down Expand Up @@ -47,7 +47,7 @@
<DownloadLink
v-if="!isImage"
:url="attachment.url"
class="absolute top-1.5 right-1.5 opacity-0 group-hover:opacity-100 transition-opacity"
class="absolute top-1.5 right-1.5 transition-opacity [@media(hover:hover)]:opacity-0 [@media(hover:hover)]:group-hover:opacity-100"
/>
</div>
</PopoverTrigger>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<span class="sidebar-value break-all" v-if="attribute.data_type !== 'checkbox'">
{{ customAttributes?.[attribute.key] ?? '-' }}
</span>
<div class="flex items-center gap-0.5 opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 flex-shrink-0">
<div class="flex items-center gap-0.5 transition-opacity duration-200 flex-shrink-0 [@media(hover:hover)]:opacity-0 [@media(hover:hover)]:group-hover/item:opacity-100">
<button
class="p-1 rounded-md hover:bg-muted cursor-pointer transition-colors"
@click="startEditing(attribute)"
Expand Down
Loading