feat(frontend): add compact anonymous conversation labels
Build and publish Docker images / Build and publish images (push) Successful in 2m48s
Build and publish Docker images / Build and publish images (push) Successful in 2m48s
This commit is contained in:
+9
-2
@@ -1,6 +1,9 @@
|
||||
<script setup>
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { getLastMessage } from 'dashboard/helper/conversationHelper';
|
||||
import {
|
||||
getConversationContactDisplayName,
|
||||
getLastMessage,
|
||||
} from 'dashboard/helper/conversationHelper';
|
||||
import Avatar from 'next/avatar/Avatar.vue';
|
||||
import MessagePreview from './MessagePreview.vue';
|
||||
import InboxName from '../InboxName.vue';
|
||||
@@ -34,6 +37,10 @@ const emit = defineEmits([
|
||||
|
||||
const hovered = ref(false);
|
||||
|
||||
const currentContactName = computed(() =>
|
||||
getConversationContactDisplayName(props.currentContact, props.chat.id)
|
||||
);
|
||||
|
||||
const unreadCount = computed(() => props.chat.unread_count);
|
||||
const hasUnread = computed(() => unreadCount.value > 0);
|
||||
const lastMessageInChat = computed(() => getLastMessage(props.chat));
|
||||
@@ -174,7 +181,7 @@ watch(
|
||||
class="conversation--user text-sm my-0 min-w-0 flex-1 capitalize text-ellipsis overflow-hidden whitespace-nowrap text-n-slate-12"
|
||||
:class="hasUnread ? 'font-semibold' : 'font-medium'"
|
||||
>
|
||||
{{ currentContact.name }}
|
||||
{{ currentContactName }}
|
||||
</h4>
|
||||
<TimeAgo
|
||||
:last-activity-timestamp="chat.timestamp"
|
||||
|
||||
Reference in New Issue
Block a user