Commit 11fc92d4 authored by Killian Kemps's avatar Killian Kemps
Browse files

Display photos in conversations

parent 55ec3271
......@@ -7,6 +7,11 @@
<template v-if="attachment.type === 'sticker'">
<img v-bind:src="attachment.url" v-bind:width="attachment.width"/>
<template v-if="attachment.type === 'photo'">
<a v-bind:href="attachment.previewUrl">
<img v-bind:src="attachment.thumbnailUrl" v-bind:alt=""/>
<template v-else>
<img v-bind:src="attachment.image" v-bind:alt="attachment.title" width="150px"/>
......@@ -4,11 +4,22 @@
<li v-for="conversation in conversations">
<router-link :to="{ name: 'conversation', params: { conversationID: conversation.threadID , conversationName:}}">
{{ }}
<template v-if="conversation.imageSrc">
<img v-bind:src="conversation.imageSrc" width="30px"/>
<!-- Temporary placeholder if conversation has no image -->
<template v-else>
<div style="width: 30px; height: 30px; display: inline-block; background-color: gray;"></div>
{{ 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"/>
<!-- Display images in snippet if there are some -->
<template v-for="attachment in conversation.snippetAttachments">
<template v-if="attachment.attach_type === 'photo'">
<img v-bind:src="attachment.thumbnail_url"/>
<template v-else>
<img v-bind:src="attachment.url"/>
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