diff --git a/client/src/components/UserWidget.vue b/client/src/components/UserWidget.vue index 20a35268..82b4f3c9 100644 --- a/client/src/components/UserWidget.vue +++ b/client/src/components/UserWidget.vue @@ -2,14 +2,14 @@
diff --git a/client/src/components/rooms/RoomEntry.vue b/client/src/components/rooms/RoomEntry.vue index f95e846b..a440156f 100644 --- a/client/src/components/rooms/RoomEntry.vue +++ b/client/src/components/rooms/RoomEntry.vue @@ -17,11 +17,28 @@ import UserWidget from '@/components/UserWidget.vue'; export default { - props: ['title', 'teaser', 'image', 'author'], + props: ['title', 'author', 'contents'], components: { UserWidget + }, + + computed: { + image() { + if (this.contents) { + let found = this.contents.find(c => c.type === 'image_url'); + return found ? found.value.url : ''; + } + return ''; + }, + teaser() { + // if (this.contents && this.contents.length) { + // if (this.contents[0].type === 'link') + // } + return ''; + } } + } diff --git a/client/src/pages/room.vue b/client/src/pages/room.vue index ef556617..a940adab 100644 --- a/client/src/pages/room.vue +++ b/client/src/pages/room.vue @@ -12,7 +12,7 @@