Profile- and Chat Card now display the last message as a preview

This commit is contained in:
joschuatonn
2024-06-16 18:04:07 +02:00
parent e239e69ff7
commit a5c4aea738
2 changed files with 5 additions and 1 deletions

View File

@@ -3,6 +3,7 @@
const props = defineProps({
chat: Object,
selected: Boolean,
lastMessage: String,
})
</script>
@@ -14,6 +15,8 @@
<p style="margin-bottom: 0;line-height: 25px;vertical-align: middle;height: 25px;display: table-cell;">
<span style="font-weight: bold;font-size: 1.2rem;">{{props.chat!.displayName}}</span>
</p>
<p style="margin: 0;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;width:20rem;">{{ props.lastMessage }}</p>
</div>
</div>
</template>

View File

@@ -4,6 +4,7 @@
user: Object,
selected: Boolean,
slim: Boolean,
lastMessage: String
})
</script>
@@ -18,7 +19,7 @@
</p>
<p v-if="!props.slim" style="margin: 0;">{{ props.user!.status }}</p>
<p v-else style="margin: 0;">Hier steht die letzte Nachricht</p>
<p v-else style="margin: 0;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;width:20rem;">{{ props.lastMessage }}</p>
</div>
</div>
</template>