Skip to content

Commit ce8ce62

Browse files
author
Dan Hersam
committed
Show text for any item with text.
Show the text of any item that has it. Jobs don't have comments, so don't show the 'No comments yet' message.
1 parent 4c48b64 commit ce8ce62

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/components/ItemView.vue

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div class="item-view" v-show="item">
33
<item :item="item"></item>
4-
<p class="jobtext" v-if="isJob" v-html="item.text"></p>
4+
<p class="itemtext" v-if="hasText" v-html="item.text"></p>
55
<ul class="poll-options" v-if="pollOptions">
66
<li v-for="option in pollOptions">
77
<p>{{option.text}}</p>
@@ -56,6 +56,10 @@ export default {
5656
computed: {
5757
isJob () {
5858
return this.item.type === 'job'
59+
},
60+
61+
hasText () {
62+
return this.item.hasOwnProperty('text')
5963
}
6064
}
6165
}
@@ -80,9 +84,10 @@ export default {
8084
.subtext
8185
color $gray
8286
font-size 11px
83-
.jobtext
87+
.itemtext
8488
color $gray
8589
margin-top 0
86-
.jobtext p
90+
margin-bottom 30px
91+
.itemtext p
8792
margin 10px 0
8893
</style>

0 commit comments

Comments
 (0)