chore: Minor fix

This commit is contained in:
iamsivin
2026-02-22 23:24:22 +05:30
parent 7666b381ae
commit 540135a1cb
6 changed files with 14 additions and 31 deletions
@@ -1,13 +1,5 @@
<script setup>
import {
ref,
computed,
inject,
nextTick,
useSlots,
watch,
useAttrs,
} from 'vue';
import { ref, computed, nextTick, useSlots, watch, useAttrs } from 'vue';
import { useI18n } from 'vue-i18n';
import { useThrottleFn } from '@vueuse/core';
import { useMapGetter } from 'dashboard/composables/store';
@@ -90,14 +82,6 @@ const throttledCalculate = useThrottleFn(computeVisibleLabelPosition, 16);
watch(activeLabels, () => nextTick(throttledCalculate), { immediate: true });
// Recalculate when parent triggers (e.g., tab changes in ChatList)
// Needed because inbox conversation view shows metadata inside CardLabels, affecting available width
const recalculateKey = inject('recalculateLabelsKey', null);
if (recalculateKey) {
watch(recalculateKey, () => nextTick(throttledCalculate));
}
const hiddenLabelsCount = computed(() => {
if (!showExpandLabelButton.value || showAllLabels.value) return 0;
return activeLabels.value.length - labelPosition.value - 1;
@@ -22,6 +22,7 @@ const props = defineProps({
showInboxName: { type: Boolean, default: false },
hideThumbnail: { type: Boolean, default: false },
enableSelection: { type: Boolean, default: true },
isInboxView: { type: Boolean, default: false },
});
const emit = defineEmits(['selectConversation', 'click', 'contextmenu']);
@@ -48,7 +49,7 @@ const showLabelsSection = computed(
const showMetaSection = computed(
() =>
props.showInboxName ||
(!props.isInboxView && props.showInboxName) ||
(props.showAssignee && props.assignee?.name) ||
props.chat.priority
);
@@ -93,11 +94,16 @@ const onSelectConversation = checked => {
'mx-2': compact,
}"
>
<InboxName v-if="showInboxName" :inbox="inbox" class="flex-1 min-w-0" />
<InboxName
v-if="showInboxName && !isInboxView"
:inbox="inbox"
class="flex-1 min-w-0"
/>
<div
v-if="showAssignee || chat.priority"
class="flex items-center gap-2 flex-shrink-0 h-4"
:class="{
'flex-1 justify-between': !showInboxName,
'flex-1 justify-between': isInboxView || !showInboxName,
}"
>
<span
@@ -116,7 +116,7 @@ const selectedModel = computed({
<InboxName v-if="showInboxName" :inbox="inbox" class="min-w-0" />
</div>
<div class="w-px h-3 bg-n-slate-6 flex-shrink-0" />
<div v-if="!isInboxView" class="w-px h-3 bg-n-slate-6 flex-shrink-0" />
<div
v-tooltip.top="{
@@ -21,7 +21,6 @@ const props = defineProps({
compact: { type: Boolean, default: false },
enableContextMenu: { type: Boolean, default: false },
allowedContextMenuOptions: { type: Array, default: () => [] },
// eslint-disable-next-line vue/no-unused-properties
enableSelection: { type: Boolean, default: true },
isExpandedLayout: { type: Boolean, default: false },
isPreviousConversations: { type: Boolean, default: false },
@@ -196,7 +195,7 @@ const deleteConversation = () => {
@contextmenu="openContextMenu"
/>
<!-- Compact: All other cases (mobile OR isExpandedLayout=false) - Using older ConversationCard -->
<!-- Compact: All other cases (mobile OR isExpandedLayout=false) -->
<ConversationCardCompact
v-else
:chat="chat"