feat: Don't hide thumbnail on hover (#10935)
### Old behavior https://github.com/user-attachments/assets/5d7524c1-b1ca-454f-8e89-843ca25d017e ### New behavior https://github.com/user-attachments/assets/49814190-d6b4-4553-bced-3987be3583e2 --------- Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Co-authored-by: iamsivin <iamsivin@gmail.com>
This commit is contained in:
@@ -156,13 +156,14 @@ export default {
|
|||||||
</slot>
|
</slot>
|
||||||
<img
|
<img
|
||||||
v-if="badgeSrc"
|
v-if="badgeSrc"
|
||||||
class="source-badge"
|
class="source-badge z-20"
|
||||||
:style="badgeStyle"
|
:style="badgeStyle"
|
||||||
:src="`/integrations/channels/badges/${badgeSrc}.png`"
|
:src="`/integrations/channels/badges/${badgeSrc}.png`"
|
||||||
alt="Badge"
|
alt="Badge"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
v-if="showStatusIndicator"
|
v-if="showStatusIndicator"
|
||||||
|
class="z-20"
|
||||||
:class="`source-badge user-online-status user-online-status--${status}`"
|
:class="`source-badge user-online-status user-online-status--${status}`"
|
||||||
:style="statusStyle"
|
:style="statusStyle"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -95,9 +95,6 @@ export default {
|
|||||||
activeInbox: 'getSelectedInbox',
|
activeInbox: 'getSelectedInbox',
|
||||||
accountId: 'getCurrentAccountId',
|
accountId: 'getCurrentAccountId',
|
||||||
}),
|
}),
|
||||||
bulkActionCheck() {
|
|
||||||
return !this.hideThumbnail && !this.hovered && !this.selected;
|
|
||||||
},
|
|
||||||
chatMetadata() {
|
chatMetadata() {
|
||||||
return this.chat.meta || {};
|
return this.chat.meta || {};
|
||||||
},
|
},
|
||||||
@@ -182,10 +179,10 @@ export default {
|
|||||||
|
|
||||||
router.push({ path });
|
router.push({ path });
|
||||||
},
|
},
|
||||||
onCardHover() {
|
onThumbnailHover() {
|
||||||
this.hovered = !this.hideThumbnail;
|
this.hovered = !this.hideThumbnail;
|
||||||
},
|
},
|
||||||
onCardLeave() {
|
onThumbnailLeave() {
|
||||||
this.hovered = false;
|
this.hovered = false;
|
||||||
},
|
},
|
||||||
onSelectConversation(checked) {
|
onSelectConversation(checked) {
|
||||||
@@ -249,28 +246,36 @@ export default {
|
|||||||
'has-inbox-name': showInboxName,
|
'has-inbox-name': showInboxName,
|
||||||
'conversation-selected': selected,
|
'conversation-selected': selected,
|
||||||
}"
|
}"
|
||||||
@mouseenter="onCardHover"
|
|
||||||
@mouseleave="onCardLeave"
|
|
||||||
@click="onCardClick"
|
@click="onCardClick"
|
||||||
@contextmenu="openContextMenu($event)"
|
@contextmenu="openContextMenu($event)"
|
||||||
>
|
>
|
||||||
<label v-if="hovered || selected" class="checkbox-wrapper" @click.stop>
|
<div
|
||||||
<input
|
class="relative"
|
||||||
:value="selected"
|
@mouseenter="onThumbnailHover"
|
||||||
:checked="selected"
|
@mouseleave="onThumbnailLeave"
|
||||||
class="checkbox"
|
>
|
||||||
type="checkbox"
|
<label
|
||||||
@change="onSelectConversation($event.target.checked)"
|
v-if="hovered || selected"
|
||||||
|
class="checkbox-wrapper absolute inset-0 z-20 backdrop-blur-[2px]"
|
||||||
|
@click.stop
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
:value="selected"
|
||||||
|
:checked="selected"
|
||||||
|
class="checkbox"
|
||||||
|
type="checkbox"
|
||||||
|
@change="onSelectConversation($event.target.checked)"
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
<Thumbnail
|
||||||
|
v-if="!hideThumbnail"
|
||||||
|
:src="currentContact.thumbnail"
|
||||||
|
:badge="inboxBadge"
|
||||||
|
:username="currentContact.name"
|
||||||
|
:status="currentContact.availability_status"
|
||||||
|
size="40px"
|
||||||
/>
|
/>
|
||||||
</label>
|
</div>
|
||||||
<Thumbnail
|
|
||||||
v-if="bulkActionCheck"
|
|
||||||
:src="currentContact.thumbnail"
|
|
||||||
:badge="inboxBadge"
|
|
||||||
:username="currentContact.name"
|
|
||||||
:status="currentContact.availability_status"
|
|
||||||
size="40px"
|
|
||||||
/>
|
|
||||||
<div
|
<div
|
||||||
class="px-0 py-3 border-b group-hover:border-transparent flex-1 border-n-slate-3 w-[calc(100%-40px)]"
|
class="px-0 py-3 border-b group-hover:border-transparent flex-1 border-n-slate-3 w-[calc(100%-40px)]"
|
||||||
>
|
>
|
||||||
@@ -400,7 +405,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.checkbox-wrapper {
|
.checkbox-wrapper {
|
||||||
@apply h-10 w-10 flex items-center justify-center rounded-full cursor-pointer mt-4 hover:bg-woot-100 dark:hover:bg-woot-800;
|
@apply h-10 w-10 flex items-center justify-center rounded-full cursor-pointer mt-4;
|
||||||
|
|
||||||
input[type='checkbox'] {
|
input[type='checkbox'] {
|
||||||
@apply m-0 cursor-pointer;
|
@apply m-0 cursor-pointer;
|
||||||
|
|||||||
Reference in New Issue
Block a user