Commit 55ec3271 authored by Killian Kemps's avatar Killian Kemps

Display images in conversations and oconversation's list

parent 7214a7e7
......@@ -2,7 +2,15 @@
<div>
<ul id="messages">
<li v-for="message in messages">
{{ message.senderName }}: {{ message.body }}
[{{ message.timestampDatetime }}] {{ message.senderName }}: {{ message.body }}
<template v-for="attachment in message.attachments">
<template v-if="attachment.type === 'sticker'">
<img v-bind:src="attachment.url" v-bind:width="attachment.width"/>
</template>
<template v-else>
<img v-bind:src="attachment.image" v-bind:alt="attachment.title" width="150px"/>
</template>
</template>
</li>
</ul>
<form action="" v-on:submit.prevent="sendMsg">
......
......@@ -6,6 +6,10 @@
{{ conversation.name }}
<img v-bind:src="conversation.imageSrc" width="30px"/>
{{ conversation.snippet }}
<!-- Display image in snippet if there is one -->
<template v-if="conversation.snippetAttachments.length > 0">
<img v-bind:src="conversation.snippetAttachments[0].url"/>
</template>
</router-link>
</li>
</ul>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment